Hello World Program

public class SayHello {
   
    public static void main(String args[]) {
        
        System.out.println("Hello World!");
    }
}


Output:

Hello World!

Explanation:

 In Java everything is class and object. We can name our class pretty much what we want, there is no restriction. However, the best programming practice is to start your class name with the upper case and the subsequent word should be the upper case as well so that it will be much more readable.

In order to run and execute any java class we need a main method in it. So, we need to remember the syntax of the "main" method. In order to print something into the console we need a print method and the way we can use is by calling the System class. And, finally into the parenthesis we can type pretty much what we want.

Please share your thoughts if you have any questions.

3 comments:

  1. Thank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me

    Data Science training in chennai
    Data Science training in OMR
    Data Science training in chennai
    Data Science Training in Chennai
    Data Science training in Chennai
    Data science training in bangalore

    ReplyDelete
  2. Palin Analytics provides the best short-term courses in India. We provide online classes and You study from home. You have any problem in class you can ask during class from your mentor. you can learn easily from anywhere in India.Palin Analytics

    ReplyDelete
  3. This is really a nice and informative, containing all information and also has a great impact on the new technology. Thanks for sharing it,
    business analytics training in hyderabad

    ReplyDelete