Menu
Question Index
...

What will be the output of the following program?

public class CombinedInf  {
    public static void main(String[] args) {
        char c1 = 65;
        char c2 = 'P';
        char c3 = 'L';
        char c4 = 'E';
        System.out.print(c1);
        System.out.print(c2);
        System.out.print(c2);
        System.out.print(c3);
        System.out.print(c4);
    }
}


65PPLE
65PLE
APPLE
Compilation Error
Runtime Error

Doubts

Problems

Topic: Character Literals In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App