MCQs > IT & Programming > Java > What would be the result of compiling and running the following code class? public class Test { public static void main (String args[]) { Test t = new Test (); t.start (); } public void start () { int i = 2; int j = 3; int x = i & j; System.out.println (x); } }

Java MCQs

What would be the result of compiling and running the following code class?

 public class Test
{
 public static void main (String args[])
 {
 Test t = new Test ();
 t.start ();
 }
 public void start ()
 {
 int i = 2;
 int j = 3;
 int x = i & j;
 System.out.println (x);
 }
 }

Answer

Correct Answer: The code will compile and print 2

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it