Java First Program

0
01.Java Basics.
Java First Program:
Essential Statements of java Program
To develop, compile, execute and print output on monitor, every java program must has below 3 statements.
1. class block: because only class allows us to define method with logic.
2. main method: because  it is initial point of class logic execution.
3. System.out.println: because in java all kinds of data is printed by using this statement .

 The below programs should compile and execute without errors when we use below main methods.

// FirstProgram.java
//This Application Program Prints Welcome to www.NetLoJava.blogspot.com

class FirstProgram
{
  public static void main(String[] netlojava)
     {
        System.out.println("Welcome to Netlojava.blogspot.com");
     }
  }

// FirstProgram2.java
//This Application Program Prints Welcome to www.NetLoJava.blogspot.com

class FirstProgram2
  {
     public static void main(String[] arg)
        {
           System.out.println("Welcome to Netlojava.blogspot.com");
        }
  }

// FirstProgram3.java
//This Application Program Prints Welcome to www.NetLoJava.blogspot.com

class FirstProgram3
  {
     public static void main(String[] args)
         {
            System.out.println("Welcome to Netlojava.blogspot.com");
         }
  }

// FirstProgram4.java
//This Application Program Prints Welcome to www.NetLoJava.blogspot.com

class FirstProgram4
  {
      public static void main(java.lang.String[] arg)
         {
            System.out.println("Welcome to Netlojava.blogspot.com");
         }
  }

// FirstProgram5.java
//This Application Program Prints Welcome to www.NetLoJava.blogspot.com

class FirstProgram5
  {
     public static void main(java.lang.String[] args)
        {
           System.out.println("Welcome to Netlojava.blogspot.com");
        }
  }

// FirstProgram6.java
//This Application Program Prints Welcome to www.NetLoJava.blogspot.com

class FirstProgram6
  {
     public static void main(java.lang.String[] netlojava)
        {
           System.out.println("Welcome to Netlojava.blogspot.com");
        }
  }

// FirstProgram7.java
//This Application Program Prints Welcome to www.NetLoJava.blogspot.com

class FirstProgram7
  {
      public static void main(String arg[])
         {
            System.out.println("Welcome to Netlojava.blogspot.com");
         }
  }

// FirstProgram8.java
//This Application Program Prints Welcome to www.NetLoJava.blogspot.com

class FirstProgram8
  {
     public static void main(String args[])
         {
           System.out.println("Welcome to Netlojava.blogspot.com");
        }
  }

// FirstProgram9.java
//This Application Program Prints Welcome to www.NetLoJava.blogspot.com

class FirstProgram9
  {
     public static void main(String netlojava[])
        {
           System.out.println("Welcome to Netlojava.blogspot.com");
        }
  }

// FirstProgram10.java
//This Application Program Prints Welcome to www.NetLoJava.blogspot.com

class FirstProgram10
  {
     public static void main(String... arg)
        {
           System.out.println("Welcome to Netlojava.blogspot.com");
        }
  }

// FirstProgram11.java
//This Application Program Prints Welcome to www.NetLoJava.blogspot.com

class FirstProgram11
  {
     public static void main(String... args)
        {
           System.out.println("Welcome to Netlojava.blogspot.com");
        }
  }


Previous  1  2  3  4  5  Next

About the author

Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus. Aenean fermentum, eget tincidunt.

0 comments:

Recent Posts