Home
Videos uploaded by user “Toshika Singh”
Basic Java: Part 1
 
29:06
In Java there are four types of variables: 1) Non-static fields 2) Static fields 3) Local variables 4) Parameters Method: A method is a set of code which is referred to by name and can be called (invoked) at any point in a program simply by utilizing the method's name.
Views: 38 Toshika Singh
Class 1: Download JAVA & Setup JAVA Path On Windows Operating System
 
12:19
Step 0: Un-Install Older Version of JDK/JRE I recommend that you install only the latest JDK. Although you can install multiple versions of JDK/JRE concurrently, it is messy. If you have previously installed older version of JDK/JRE, un-install ALL of them. Goto "Control Panel" = "Programs" = "Programs and Features" = Un-install ALL programs begin with "Java", such as "Java SE Development Kit ...", "Java SE Runtime ...", "Java X Update ...", and etc. Step 1: Download JDK Goto Java SE download site @ http://www.oracle.com/technetwork/java/javase/downloads/index.html. Under "Java Platform, Standard Edition" = "Java SE 10.0", where x denotes a fast running update number = Click the JDK's "Download" button. Under "Java SE Development Kit 10.0.x" = Check "Accept License Agreement". Choose the JDK for your operating system, i.e., "Windows" for 64-bit Windows OS, and download the installer e.g., "jdk-10.0_windows-x64_bin.exe" - 390MB. Step 2: Install JDK and JRE Run the downloaded installer e.g., "jdk-10.0.windows-x64_bin.exe", which installs both the JDK and JRE. By default: JDK is installed in directory "C:\Program Files\Java\jdk-10.0.x, where x denotes the upgrade number; and JRE is installed in "C:\Program Files\Java\jre-10.0.x". Notes: In 64-bit Windows, "Program Files" is meant for 64-bit programs; while "Program Files (x86)" for 32-bit programs. Accept the defaults and follow the screen instructions to install JDK and JRE. Use the "File Explorer", goto "C:\Program Files\Java" to inspect these folders. Take note of your JDK installed directory, in particular, the varying upgrade number, which you will need in the next step. Step 3: Include JDK's "bin" Directory in the PATH Windows' Shell searches the current directory and the directories listed in the PATH environment variable or system variable for executable programs. JDK's programs such as Java compiler javac.exe and Java runtime java.exe, reside in the sub-directory "bin" of the JDK installed directory. You need to include "bin" in the PATH to run the JDK programs. To edit the PATH environment variable in Windows 7/8/10: Launch "Control Panel" = Optional System and Security = System = Click "Advanced system settings" on the left pane. Switch to "Advanced" tab = Push "Environment Variables" button. Under "System Variables" (the bottom pane), scroll down to select "Path" = Click "Edit...". For Windows 10 (newer releases): You shall see a TABLE listing all the existing PATH entries if not, goto next step. Click "New" = Enter the JDK's "bin" directory "c:\Program Files\Java\jdk-10.0.{x}\bin" Replace x with your installation number! = Select "Move Up" to move this entry all the way to the TOP. Prior to newer Windows 10: In "Variable value" field, INSERT "c:\Program Files\Java\jdk-10.0.\\bin" IN FRONT of all the existing directories, followed by a semi-colon which separates the JDK's bin directory from the rest of the existing directories. DO NOT DELETE any existing entries; otherwise, some existing applications may not run. Variable name : PATH Variable value : c:\Program Files\Java\jdk-10.0\bin; Notes: Starting from JDK 1.8, the installation created a directory "c:\ProgramData\Oracle\Java\javapath" and added to the PATH. It contains only JRE executables = java.exe, javaw.exe, and javaws.exe, but NOT the JDK executables \e.g., javac.exe. // Display the JRE version prompt: java -version java version "10" 2018-04-17 Java(TM) SE Runtime Environment 18.3 Java HotSpot 64-Bit Server VM 18.3 // Display the JDK version prompt= javac -version javac 10.0
Views: 149 Toshika Singh
Class 3: Part 1 (Class And Object)
 
18:28
Class A class is a user defined blueprint or prototype from which objects are created. It represents the set of properties or methods that are common to all objects of one type. Object It is a basic unit of Object Oriented Programming and represents the real life entities. A typical Java program creates many objects, which as you know, interact by invoking methods. An object consists of : State : It is represented by attributes of an object. It also reflects the properties of an object. Behavior : It is represented by methods of an object. It also reflects the response of an object with other objects. Identity : It gives a unique name to an object and enables one object to interact with other objects.
Views: 31 Toshika Singh
Class 2: First Java Program & Print Hello World
 
09:37
Steps to Compile and Run first Java program Step 1) Open Notepad from Start menu by selecting Programs - Accessories - Notepad. Step 2) Create a Source Code for your Program Declare a class with name HelloWorld. Declare the main method public static void main(String args[]){ Now Type the System.out.println("Hello World"); which displays the text Hello World. class HelloWorld { public static void main(String args[]){ System.out.println("Hello World"); } } Step 3) Save the file as HelloWorld.java make sure to select file type as all files while saving the file in our working folder C:\workspace Step 4) Open the command prompt. Go to Directory C:\workspace. Compile the code using command, javac HelloWorld.java Step 5) If you look in your working folder, you can see that a file named HelloWorld.class has been created. Step 6) To execute the code, enter the command java followed by the class name, as expected output Hello World is displayed now. java HelloWorld Note: Java is case sensitive Programming language. All code, commands, and file names should is used in consistent casing. FirstProgram is not same as firstprogram. Step 7) If you copy and paste the same code in IDE like Eclipse the compiling and execution is done with the click of a button Using IDE is convenient and improves your efficiency but since you are learning Java, we recommend you stick to notepad.
Views: 44 Toshika Singh
Basic Java: Part 3
 
14:41
Java programming language provides the following types of loop to handle looping requirements. 1) for loop A simple for loop is the same as C/C++. We can initialize the variable, check condition and increment/decrement value. It consists of four parts: a) Initialization: It is the initial condition which is executed once when the loop starts. Here, we can initialize the variable, or we can use an already initialized variable. It is an optional condition. b) Condition: It is the second condition which is executed each time to test the condition of the loop. It continues execution until the condition is false. It must return boolean value either true or false. It is an optional condition. c) Statement: The statement of the loop is executed each time until the second condition is false. d) Increment/Decrement: It increments or decrements the variable value. It is an optional condition. for(initialization;condition;incr/decr){ //statement or code to be executed } 2) while loop Repeats a statement or group of statements if given condition is true. It checck the condition before executing the loop body. 3) do...while loop It's working similar to while loop, except that it check the condition at the end of the loop body. It will give 1 time output even though condition is false.
Views: 22 Toshika Singh
Basic Java: Part 4
 
12:55
Break and Continue Statement: break leaves from a current loop, continue jumps to the next iteration. Break statement : When a break statement is encountered inside a loop, the loop is terminated and program control resumes at the next statement following the loop. Continue statement : When a continue statement is encountered inside the body of a loop, remaining statements are skipped and loop proceeds with the next iteration.
Views: 19 Toshika Singh
Class 3: Part 2 (Detailed Description of Class And Object)
 
24:07
Class A class is a user defined blueprint or prototype from which objects are created. It represents the set of properties or methods that are common to all objects of one type. Object It is a basic unit of Object Oriented Programming and represents the real life entities. A typical Java program creates many objects, which as you know, interact by invoking methods. An object consists of : State : It is represented by attributes of an object. It also reflects the properties of an object. Behavior : It is represented by methods of an object. It also reflects the response of an object with other objects. Identity : It gives a unique name to an object and enables one object to interact with other objects.
Views: 23 Toshika Singh
Basic Java: Part 2
 
18:57
Java if..else..if Statement In Java, it's possible to execute one block of code among many. For that, you can use if..else...if ladder. class Ladder { public static void main(String[] args) { int number = 0; if (number == 1) { System.out.println("Number is positive."); } else if (number == 0) { System.out.println("Number is negative."); } else { System.out.println("Number is 0."); } } }
Views: 24 Toshika Singh

Studentification dissertation abstracts
Polymer research papers
Dissertationsschrift englischer
Video games enhance problem solving skills
Compilare curriculum vitae europeo