Menu
Question Index
...

What is the output of the following program?

public class VariableTest {
    static int i;
    final double d = 58.3395;
    int a;
    public static void main(String[] args) {
        VariableTest ob = new VariableTest();
        System.out.println(ob.a++ + +ob.d + ++VariableTest.i);// LINE A
    }
}


58.3395
60.3395
59.3395
null
Compilation Error at LINE A

Doubts

Problems

Topic: Static and Non Static Variables - Static and Non Static Methods

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App