- A 20
- B 21
- C 22
- D Compilation Error
Java Programming Language MCQ Java Data Types and Variables - MCQ
⚠ Report ✓ Question Verified Copy Link
public class Test{
static int x = 10 ;
public static void main(String[] a){
Test test = new Test( ) ;
Test test1 = new Test( ) ;
test.x += 1 ;
System.out.println( test.x + test1.x ) ;
}
}
Learn More MCQ Questions from Java Programming Language MCQ Java Data Types and Variables - MCQ