Google+

Like Us On Facebook


Total Pageviews

32. A Simple Java Program



Below is the Java Program which Prints Selenium--By-Arun text as output:

        class Simple
        {
                   public static void main(String args[])
                   {
                         System.out.println("Selenium-By-Arun");
                   }
        }

Lets understand the above Java Program by identifying the terminology used in it.

On high level, the above program has main method inside the class Simple 
  1. class is used to declare a class in java. (Will explain the concept of class in depth in upcoming posts)
  2. public means visible to all. (Will explain the concept of public in depth in upcoming posts)
  3. static If any method is declared as static, then the method is called as static method. If the method is declared as static, then there is no need of creating object to invoke the main method (Will explain the concept of static and objects in depth in upcoming posts)
  4. main represents the start of the program. The program execution starts from main method. (Will explain the concept of methods in depth in upcoming posts)
  5. String args[] is used for command line argument (Will explain this in the later posts)
  6. System.out.println() is used to print statements.




Please comment below to feedback or ask questions.

Going forward, I will use TextPad editor to write and run/execute the Java Programs. 
So how to install the TextPad editor will be explained in the next post.



3 comments:

ShivvBlog said...

Glad to see your blog, i was scared before when i started pushing my self to automation area. Now am getting confidence that i am going to learn java along with selenium tools very soon.

Thanks again for your effort. Worth for all of us...

mallik sarma said...

Mallik: I have 10+ Years of experiance but i used to scared about Java , But now i got confident that i can learn java and could write Automation scripts

Arun Motoori said...

Glad to hear that my blog is helping you. :)

Blog Index