Hope all doing
well!
Here I start with
the concepts of Core Java which are helpful for the Selenium Automation.
What is Java?
Java
is a more powerful Programming language, a high level, robust, secured and
object-oriented. It is markedly known for its powerful feature WORA (Write Once
Run Any Where). Hence Java has its own Run Time Environment (JRE) it is widely
notable as platform independent.
History of Java:
·
Originally
developed by James Gosling at Sun Micro-systems (which is now a subsidiary of Oracle Corporation) and released in 1995.
·
JDK
1.0 released in January 23, 1996.
·
Java
is initially named as OAK which is said to be the symbol of Strength.
·
JAVA
is the name of an island in Indonesia where first coffee was produced (called
java coffee).
Java Versions:
There are many
java versions that have been released. Current stable release of Java is Java
SE 8
JDK Alpha and Beta
(1995)
JDK 1.0 (23rd Jan,
1996)
JDK 1.1 (19th Feb,
1997)
J2SE 1.2 (8th Dec,
1998)
J2SE 1.3 (8th May,
2000)
J2SE 1.4 (6th Feb,
2002)
J2SE 5.0 (30th
Sep, 2004)
Java SE 6 (11th
Dec, 2006)
Java SE 7 (28th
July, 2011)
Java SE 8 (18th
March, 2014)
How to install Java?
First and foremost
check whether java is installed in your system as follows:
Go to Command
Prompt and type the command "java -version" will result the current
version of java installed in your system.
If java is not
installed download JDK and install it.
Java programs can
be executed in multiple editors here I would like to pick Notepad and Eclipse IDE
(Install Eclipse IDE here)
First Sample Java
program: The following is the first sample java program just open Note pad and
copy the following code:
Class First Program
{
public static void main(String
args[]){
System.out.println("Hello
World");
}
}
Executing through
Notepad editor:
Save this program
as First_Program.java
How to compile?
javac is the
command to compile. Go to Command prompt -> set the path where you have
saved the Java Program ->Type the Command javac First_Program.java
How to run?
After compilation
run the program: java First Program gives you the result in command prompt.
See you in Next Post with OOPs concepts :)
Cheers & Happy
Learning,
Navatha Kannadi
No comments:
Post a Comment