Leave a Reply 8

Your email address will not be published. Required fields are marked *


vyacheslafka

vyacheslafka

Why “C.10 10”? Wrong overload, the same argument. My answer “Compilation failed”

Ryan

Ryan

I agree

Ryan

Ryan

I meant to reply to vyacheslafka. The question/answers don’t match up.

xxx

xxx

complitaion error

obrain

obrain

The question/answers don’t match up.

The answare is “three”

imyrta

imyrta

Answer: Compilation time error.

God

God

Compilation failed.
no answer

renko

renko

Answer: C

Code Question:
public class StaticField {
static int i = 7;

public static void main(String[] args) {
StaticField obj = new StaticField();
obj.i++;
StaticField.i++;
obj.i++;
System.out.println(StaticField.i + ” “+ obj.i);
}

}
Output:
10 10