MCQ Single Best Answer Not Set

QWhat is the output for the below code?
public class Test{
      int _$;
      int $7;
      int do;

      public static void main(String argv[]){
            Test test = new Test();
            test.$7=7;
            test.do=9;
            System.out.println(test.$7);
            System.out.println(test.do);
            System.out.println(test._$);
      }
}

ID: #2021 Java Data Types and Variables - MCQ 1,568 views
Question Info
#2021Q ID
Not SetDifficulty
Java Data Types and Variables - MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 7 9 0
  • B Compile error - $7 is not valid identifier.
  • C 7 0 0
  • D Compile error - do is not valid identifier.
Correct Answer: Option D

Explanation

Compile error - do is not valid identifier.

Share This Question

Challenge a friend or share with your study group.