Question 1
Given the code fragment:

What is the result?
Given the code fragment:

What is the result?
Given the code snippet from a compiled Java source file:

Which command-line arguments should you pass to the program to obtain the following output?
Arg is 2
Given the code fragment:

What is the result?

Given the following classes:

Which two options fail to compile when placed at line n1 of the main method? (Choose two.)
Given the following main method:

What is the result?
Given:

And given the code fragment:
![]()
What is the result?
Given:

What is the result?
Given the code fragment:

What is the result?
Given the code fragment:

What is the result?
Given the code fragment:

Test.java:

Which is the result?

Given the code fragment from three files:

Which code fragment, when inserted at line 2, enables the code to compile?

Which statement is true about Java byte code?
Java bytecodes help make 'write once, run anywhere' possible. You can compile your program into bytecodes on any platform that has a Java compiler. The bytecodes can then be run on any implementation of the Java VM. That means that as long as a computer has a Java VM, the same program written in the Java programming language can run on Windows 2000, a Solaris workstation, or on an iMac.
What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class?
Using the private modifier is the main way that an object encapsulates itself and hide data from the outside world.
References:
Given the code fragment:

What is the result?
Given:

What is the result?