Skip to content

Hello World

Modify the WelloWorld.java so that it gives the following output. The program should declare and assign variables/identifiers of type String and int and then printout the values of the identifiers.

HelloWorld.java linenums=
package com.ait.ex1;

public class HelloWorld {
    public static void main(String[] args) {
        // identifiers
        String theNameOfThePerson="Tom";
        String theAddress = "Athlone";
        String favouriteMovie= "The Shawshank Redemption";
        int age=25;

        //TO DO
        // Printout the identifier values
    }
}

Console Output:

Tom
Athlone
The Shawshank Redemption
25


HelloWorld.java