How to write a “Welcome to JAVA” program?

How to write a “Welcome to JAVA” program?



class welcome
{
        public static void main(String[] args)
        {
                int a=2;
                System.out.println("Welcome to java");
                System.out.print("Welcome to JAVA 2");
                System.out.print("Welcome");
        }
}
// println will print the line and go in next line.
//print just print and don't go in next line.
//.class file will create with class name


Output:
Welcome to java
Welcome to JAVA 2Welcome
How to write a “Welcome to JAVA” program? How to write a “Welcome to JAVA” program? Reviewed by Unknown on January 28, 2019 Rating: 5

No comments:

If you have any doubt or query ,comment below:

Programming copyright © 2018-19. Powered by Blogger.