Hello World Java Program

Hello World Java Program

We are just getting started.Today we are going to write our fist java program that will print hello world.

Writing first java program

[
public class Hello {

    /**     * @param args the command line arguments     */    
public static void main(String[] args) {
        // TODO code application logic here
        System.out.println("Hello World");
    }

}
]
Above program code will print Hello world string.

Lets look at a few keywords from this program.

public-this is access modifier.public keyword means that the class,variable or a method can be accessed anywhere in the program and in other packages.

static -means the variable or method is shared in all class instances.For example if you define a variable static int num=10; if num is increase in one method,the change will be reflected in all instances that are using the same num.

void-this means the method has no return type.A method can return interger,array etc.

String [] args-these are console arguments that are passed as array.

System.out.println-this method outputs results to the screen.

System.in =gets data enter by user and uses it in execution.


COMMENTS

Name

android android Apps android emulators antivirus blogger bluestack Break Statement in Java constructors download downloader drivers emulators java java control statements java do-while loop java for loop java infinitive do-while loop java system methods java tutorials Java While Loop java.awt java.swing javalookandfeel javascript JButton JCheckBox JColorChooser JComboBox JDialog JFileChooser JFrame JLayeredPane JList JMenuBar joomla JOptionPane JPanel JPasswordField JPopupMenu JProgressBar JRadioButton JScrollBar JSlider JSpinner JTabbedPane JTable JTextArea JTextField JToolBar mysql php plugins Polymorphism setToolTiptext skype for windows software swing class themes Visual Studio Code WeChat whatsapp wordpress
false
ltr
item
Java Codes: Hello World Java Program
Hello World Java Program
Hello World Java Program
Java Codes
http://www.download-all.net/2017/02/hello-world-java-program.html
http://www.download-all.net/
http://www.download-all.net/
http://www.download-all.net/2017/02/hello-world-java-program.html
true
7826648292785071009
UTF-8
Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy