Lab 1 (Solved)

Unit 1 - Introduction to Java

Posted on 3/5/2025

Question 1

public class HelloWorldApp {

    public static void main(String[] args) {

        System.out.println("Hello World!!! This is my first program!");

    }

}

Question 2

public class MyFirstJavaProgram {

    public static void main(String[] args)
    {
        System.out.println("My Second Java Program");
        System.out.println("The sum of 17 and 8 is "+ 25);
        System.out.println("32 + 16 = " + (32+16));
    }
}

Question 3

public class Example1
{
    public static void main(String [] args)
    {
        System.out.println("Hi there");
    }
}

Question 4

  • Byte Code
  • Case Sensitive
  • Machine Code
  • high-level language

Question 5

  • Bytecode

Question 6

  • Machine language

Question 7

  • 1
  • 2
  • 4
  • 3
  • 5