Home Tutorial Java Scjp Part1 SCJP Module-1 Question-17


Share on Google+Share on Google+
SCJP Module-1 Question-17
Posted on: July 8, 2010 at 12:00 AM
The program given below checks you knowledge of core Java concepts and program flow. This program is also very useful for preparation for SCJP exams.

Given a sample code:

class Sample {
int x = 100;

public void checkValue(int x) {
x += 1;

public static void main(String args[]) {
Sample t = new Sample ();

What will be the result of above code ?

(1)    106
(2)    6
(3)    7
(4)    107




Related Tags for SCJP Module-1 Question-17:

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 8, 2010

Recommend the tutorial

Advertisements Advertisements