Initializing and displaying various variables

Report a typo

In a basic Java program, you need to display information about various types of variables. Fill the blanks in the provided code to properly initialize an integer, and a single character, and then output these values, along with a predefined string, to the console.

Fill in the gaps with the relevant elements
public class Main {
    public static void main([] args) {
         numberExample = 123;
         characterExample = 'J';
        String stringExample = "Java Beginner";
        
        System.out.println("Number: " + numberExample);
        System.out.println("Character: " + characterExample);
        System.out.println("String: " + stringExample);
    }
}
___

Create a free account to access the full topic