Select the correct option based upon the following sample code:
public class Test
{
static int a;
int b;
public Test ()
{
int c;
c = a;
a++;
b += c;
System.out.println ("one");
}
public void Test ()
{
int c;
c = a;
a++;
b += c;
System.out.println ("two");
}
public static void main (String args[])
{
Test t = new Test ();
}
}
Correct Answer: The code will compile and run successfully. It will print ''one''
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Java MCQ Questions