Hello world program in Java Before we start learning about program, if you are not aware of what is Java check out my previous article Introduction to Java Hello World Program public class MyFirstJavaProgram { /* This is my first java program. * This will print 'Hello World' as the output */ public static void main ( String [] args ) { System . out . println ( "Hello World" ); // prints Hello World } } Lets see , what is meaning of this program and how it can be saved ,compiled and run: In java every line of code that can actually run should be inside class. To run any java program main method is mandatory and will be defined in the same format : public static void main ( String [] args ) public : can be accessed from anyone within the system Static : using static keyword ,any m...
Introduction to Java Java is an High level programming language Java was designed by Sun Micro system in 1995 and is currently owned by Oracle Java is platform independent which means once you write the program in java it will execute in different platforms Java is portable, Robust and Dynamic Java guarantees Write ones and Run anywhere Java runs on 3 Billion devices like Android OS, web applications etc In Java everything is an object hence it can be easily extended Java's multi threading property enables to perform multiple tasks simultaneously