MCQs > IT & Programming > JSharp - J# > What will be the result obtained on compiling and running the viewer on .net command prompt?

JSharp - J# MCQs

The Tracer and Viewer classes are as follows:
class Tracer {
  public static int traceNo = 10;
}

class Viewer {

     Viewer() {
       Tracer t1 = new Tracer();
       Tracer t2 = new Tracer();
      
       update(t1);
       update(t2);
     }
    
     private void update(Tracer t) {
        t.traceNo = t.traceNo + 1;
        System.out.println(t.traceNo);
     }

     public static void main(String str[]) {
       new Viewer();
     }
}

What will be the result obtained on compiling and running the viewer on .net command prompt?

Answer

Correct Answer:

Explanation:

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

JSharp - J# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

More JSharp - J# MCQ Questions

search

JSharp - J# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it