If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
Correct Answer :
Download Objective type questions of
Visit our PDF store
Get all objective type questions of Java Programming MCQ
comments powered by Disqus.
When we implement an interface method, it should be declared as public.
A static class method can be invoked by simply using the name of the method alone.
Members of a class specified as private are accessible only to the methods of the class.
It is perfectly legal to assign a subclass object to a supper class reference.
Which are the valid ways to create DataInputStream streams?
Servlet has ___________
The keywords reserved but not used in the initial version of Java re:
Which key word can protect a class in package from accessibility by the classes outside the package?
A final class may not have any abstract method.
A panel can not be added to another panel.
forName() is a static factory method
Which of the following will produce a value of 10 if x = 9.7?
For all insert, update, delete, query operations on a database, ResultSet object creation is mandatory.
Given the codeString s = new String("abc");Which of the following calls are valid?
Which of the following will produce a value of 22 if x=22.9:
Which of the following represent legal flow control statements?
Declarations can appear anywhere in the body of a Java method.
DriverManager.getConnection("jdbc:odbc:dsn_name") method does not depend on the class.forName(...) method.
With javadoc, which of the following denotes a javadoc comment?
All methods in an abstract class must be declared abstract.
Which exception is thrown by the read() method of InputStream class?
It is an error if a class with one or more abstract methods is not explicitly declared abstract.
executeUpdate(------------) returns ___________
Which of the following control expressions are valid for an if statement?
The name of a Java program file must match the name of the class with the extension Java.
If m and n are int type variables, what will be the result of the expression'm % n' when m = -14 and…
In evaluating a logical expression of type 'Boolean expression 1&& Boolean expression 2', both the Boolean…
The break statement is required in the default case of a switch selection structure.
If you want to assign a value of 99 to the variable year, then which of the following lines can be used…
Every call to wait has a corresponding call to notify that will eventually end the wafting.
Join our Chat Group
Join our Twitter Group
Join our Pinterest Group
Join our Facebook Group
Subscribe to our Email Newsletter