Day 1 Java Introduction
Day 1 Java Introduction
Day 1
• Java Is Architecture-Neutral
• Java Is Portable
• Java's Performance
• Java Is Multithreaded
• Java Is Dynamic
• Java's Performance
• Java Is Multithreaded
• Java Is Dynamic
• Java Is Dynamic
System.out.println("Welcome to Java!");
}
}
• In Windows
– Open command prompt
– Goto your directory of java program
– Then use the following command to compile your
code
• javac Welcome.java
–javac ProgramName with extention
• In Ubuntu
– Open Terminal
– Goto your directory of java program
– Then use the following command to compile your
code
• javac Welcome.java
• javac ProgramName with
extention
Java Training for WIPRO TalentNext 2017 -
13-Mar-18 27
Vaibhav Diwan
Executing a Java Program
• In Windows
– Open command prompt
– Goto your directory of java program
– Then use the following command to compile your
code
• java Welcome
java ProgramName
• In Ubuntu
– Open command prompt
– Goto your directory of java program
– Then use the following command to compile your
code
• java Welcome
java ProgramName
• Class name
• Main method
• Statements
• Statement terminator
• Reserved words
• Comments
• Blocks
System.out.println("Welcome to Java!") ;
}
}
" " Opening and closing Enclosing a string (i.e., sequence of characters).
quotation marks
; Semicolon Marks the end of a statement.
1. Download Java
2. Install Java
3. Update Path environmental variable
4. Verify Installation
2. Type URL:
http://www.orac
le.com/technetw
ork/java/javase/
downloads/index
.html to go to
Oracle download
page
3. Click on button “
JDK download ”
for Java SE
update 4.
This will lead you
JDK download
page
http://www.orac
le.com/technetw
ork/java/javase/
downloads/jdk-
7u4-downloads-
1591156.html
• The bin directory contains both the compiler and the launcher. The path environmental variable should be
updated to include path to bin in PATH variable. This is not mandatory, but highly recommended for convenience.
• It is useful to set the PATH variable permanently so it will persist after rebooting.
• To set the PATH variable permanently, add the full path of the jdk1.7.0\bin directory to the PATH variable. Typically,
this full path looks something like C:\Program Files\Java\jdk1.7.0\bin in Windows o/s.
4. 5.