Home / Programming MCQs / JAVA MCQs / Question
J
Q. What 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._$); } }
$7 is valid identifier. Identifiers must start with a letter, a currency character ($), or underscore ( _ ). Identifiers cannot start with a number. You can't use a Java keyword as an identifier. do is a Java keyword.
You must be Logged in to update hint/solution
Which of these classes is related to all the exceptions that can be caught by using catch?
Which method take a string not a URL?
What is the output of the following?
The method used to set Fonts is
Which of those is synchronized?
Application is instance of which class?
Which is the keyword used to inherit a class to another?
In general Bitwise logical operators are simply called?
If an AND (&) operator is applied with two integers, what is this operator?
Discusssion
Login to discuss.