Menu
Question Index
...

What will be the output of the following program?

public class Student {
    public static void main(String[] args) {
        String name = "Raju", marks = "1";
        String section = "A";
        marks = 560;
        System.out.println("Name: " + name);
        System.out.println("Section: " + section);
        System.out.println("Marks: " + marks);
    }
}


Name: Raju
Section: A
Marks: 560
Name: Raju
Section: A
Marks: 1560
Compilation Error
Runtime Error

Doubts

Problems

Topic: 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