The name of a Java program file must match the name of the class with the extension Java.
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.
Which of the following will produce a value of 22 if x=22.9:
The setBackground() method is part of the class
Which of the following control expressions are valid for an if statement?
The length of a string object 's1' can be obtained using the expression s1.length.
In order to connect to a database through java program we must create _______-
Java is fully object oriented programme.
Connection, Statement are interfaces and ResultSet is a class.
It is an error to catch the same type of exception in two different catch blocks associated with a particular…
Any class may be inherited by another class in the same package.
Which of the following statements are valid array declarations?
Which key word can protect a class in package from accessibility by the classes outside the package?
Declaring a method synchronized guarantees that the deadlock cannot occur.
In evaluating a logical expression of type 'Boolean expression 1&& Boolean expression 2', both the Boolean…
A class may be both abstract and final.
class.forName(...) creates an instance of java ODBC driver
The check box group class is a subclass of the component class.
Any method in a supper class can be over ridden in its subclass.
forName() is a static factory method
Which of the following methods can be used to change the size of a size() *resize()
The programmer must explicitly create the system .in and system .out objects.
Which of the following will produce a value of 10 if x = 9.7?
A package is a collection of
Which of the following represent legal flow control statements?
Which javadoc tag is used to denote a comment for methods parameters?
The use of protected keyword to a member in a class will restrict its visibility as follows:
In RMI we invoke client method from remote server
Give file is a file object, which of the following are legal statements to create a new file.
Two methods cannot have the same name in Java.
Which of the following are not keywords?
Join our Chat Group
Join our Twitter Group
Join our Pinterest Group
Join our Facebook Group
Subscribe to our Email Newsletter