Answers for "create your first java program"

1

first java program

// Your Package Name
package com.company;

public class Main {

    public static void main(String[] args) {
        // write your code here
        String Hi = "Hello World";
        String congrats = "This is your first Java Program";
        System.out.println(Hi);

        boolean hi = true;

        if (hi == true) {
          	System.out.println(congrats);
        }
    }
}
Posted by: Guest on May-17-2021
-2

first java program

public class MyFirstJavaProgram {

   /* This is my first java program.
    * This will print 'Hello World' as the output
    */

   public static void main(String []args) {
      System.out.println("Hello World"); // prints Hello World
   }
}
Posted by: Guest on March-27-2021

Code answers related to "create your first java program"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language