It is perfectly legal to refer to any instance variable inside of a static method.
Correct Answer :
Download Objective type questions of
Visit our PDF store
Get all objective type questions of Java Programming MCQ
comments powered by Disqus.
Declarations can appear anywhere in the body of a Java method.
The methods wait() and noify() are defined in
A catch can have comma-separated multiple arguments.
In the code below, what data types the variable x can have?
Java is fully object oriented programme.
When the string objects are compared with ==, the result is true If the strings contain the same values.
Which of the following keywords are used to control access to a class member?
The name of a Java program file must match the name of the class with the extension Java.
The programmer must explicitly create the system .in and system .out objects.
When we implement an interface method, it should be declared as public.
Which of the following command lines options generates documentation for all classes and methods?
In order to connect to a database through java program we must create _______-
Which of the following control expressions are valid for an if statement?
Java always provides a default constructor to a class.
The import statement is always the first no comment statement in a Java program files.
Which of the following represent legal flow control statements?
We would like to make a member of a class visible in all subclasses regardless of what package they…
The break statement is required in the default case of a switch selection structure.
The expression (x == y && a<b) is true If either x == y is true or a<b is true.
Which of the following statements are valid array declarations?
Which exception is thrown by the read() method of InputStream class?
If m and n are int type variables, what will be the result of the expression'm % n' when m = -14 and…
Consider the following statements: int x = 10, y = 15; x = ((x < y) ? (y + x) : (y - x); What will…
It is an error to have a method with the same signature in both the super class and its subclass.
It is perfectly legal to assign a subclass object to a supper class reference.
What is java -g used for?
In RMI before running the client program we must start RMI Registry.
Declaring a method synchronized guarantees that the deadlock cannot occur.
Which of the following will produce a value of 22 if x=22.9:
A string object can not be modified after it is created.
Join our Chat Group
Join our Twitter Group
Join our Pinterest Group
Join our Facebook Group
Subscribe to our Email Newsletter