Skip to main content

Posts

Showing posts with the label Write a Java program to Print Hello World

ads1

Java Programming || Write a Java program to Print Hello World. || BCA Sem-4

  JAVA Programming   1. Write a Java program to Print Hello World.  class helloworld { public static void main(String args[]) { System.out.println("Hello World"); } } Output :-  Explain    To create a Java Program ,  First , We have to create a Class, and assign the Name for your java program. Second , We have to write "public static void main(String args[])"   Public :- Public is an Access modifier, If we use public access specifier. It will be easy access the method . If we make the main() method public makes it globally available. Static :- Static is a keyword , Which is when associated with a method , it is a class related method. If we make main method Static ,JVM can invoke it without instantiating the class. Void :- Void is a keyword, basically void means Nothing . It  used to specify that a method doesn’t return anything. Main :- It is a java main method.  It’s not a keyword.  It is basically a identifier that JVM look for  as the starting point

ads2