Menu
Question Index
...

What will be the output of the following program?

public class GuessValue
{
    public static void main(String[] args)
    {
        int variable = 107;
        label :
        {
            ++variable;
            if (variable == 108)
                break label;
        }
        System.out.print(variable);
    }
}


107
109
108
Compilation Error
Runtime Error

Doubts

Problems

Topic: Using break In Nested Loop Java Program

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App