Our Feeds

Wednesday, 5 September 2012

AJITH KP

Hello World in Java Style

Java is a general purpose, OOP language developed by Sun Microsystems in 1991. The initial name "Oak" was given by the developer James Gosling, later named to Java. The use of Java is increases day by day. Hand held devices like Mobile, Smart phones, Computers, ATM,etc are run in Java.

Hello world in Java style




Class Declaration
 The class is declared as "Print" in this snippet. "class" is a keyword in Java and declares a new class. After compile this code you will get a class file named Print.class . Class file also know as Java bytecode.

Execution Part
 The only part which execute in above line snippet is,
      System.out.println("Hello World");

Java have two types of print functions print and println.
Check the print in Java.

The reult will be "Hello I'm w3p.How are You?" If you want place this words in different lines use "\n"


I hope you under stand what I mean. Now use of println. Println is used to print in different lines.


The out put will be same as the result which we used "\n" in print function.