Java

JAVA Language

JAVA Language

Java programming language is simple object oriented, distribut5e, interpreted, robust, robust, secure, orchi-techture, neutral, portable, high, performance, multithreaded and dynamic language. So what is the history of this programming language? The name of java was oak developed by the member of Green project which included in 1991.

Feature:

It is easy to program because if eliminate the pitfalls of other languages such as pointer arithmetic and memory manipulation in C and C++. It is object oriented to help the programmer visualize the program in real life terms. Java provides on interpreted environment to devel0op the solutions by eliminating the compile link load test cycle. Java is secure due to strong type checking done by java on the users’ machine.

The Java language use classes and methods to write programme. In java, braces {} mark the beginning and end of a class or a method and each statement ends with semi colon. Java is case sensitive.

Common structure of JAVA Program:

Public class HelloWorld

{

Public static void main (String orgs[])

{

(System.out.println(“Hello World”));

}

}

After writing the program file should be saved with the extension”Java”. The primary name of the file will be same as class name having main () method and the secondary name of the file will be java. So, this program will be saved as “Hello World.Java”

After saving the program, it is compiled into byte code (.class file) that runs on the java virtual machine which can interpret and run the program on any operating system. The Java file is compiled at console as:

C:\>java c HelloWorld.Java

After compiling the code the program can be executed using the command Java<file name> C:\> java HelloWorld Result : Hello World