Home
Current Affairs January 2024

What is the correct answer?

4

putValue(...) method takes _____________________-

A. Two arguments of object type

B. First one is of a character type and second one is of an object type

C. First one is of an object type and second one is of a character type

D. None of the above.

Correct Answer :

A. Two arguments of object type


Related Questions

What is the correct answer?

4

JSP files creates ________________

A. html files

B. html files and java files

C. java files and class files

D. None of the above.

What is the correct answer?

4

forName() is a static factory method

A. True

B. False

What is the correct answer?

4

The setBackground() method is part of the class

A. Applet

B. Component

C. Container

D. Object

What is the correct answer?

4

Members of a class specified as private are accessible only to the methods of the class.

A. True

B. False

What is the correct answer?

4

executeUpdate automatically updates data because___________

A. auto commit is on, by default

B. It performs a hidden commit statement as well

C. Does not commit

D. None of the above.

What is the correct answer?

4

The keywords reserved but not used in the initial version of Java re:

A. Synchronized

B. Boolean

C. union

D. goto

What is the correct answer?

4

Which of the following are not keywords?

A. NULL

B. Implements

C. Protected

D. None of the above

What is the correct answer?

4

One the features of is that an array can store many different types of values.

A. True

B. False

What is the correct answer?

4

Consider the following class definition.
Class Student extends String
{
}
What happens when we try to compile this class?

A. Will not compile because class body is not defined

B. Will not compile because class is not declared public

C. Will compile successfully.

D. Will not compile because String is abstract

What is the correct answer?

4

What is java -g used for?

A. Using the jdb tool

B. Executing a class with optimization turned off

C. To provided information about deprecated methods

D. Non of the above

What is the correct answer?

4

Which of the following string can be used as mode string for creating a RandomAccessFile object?

A. "rw"

B. "wr"

C. "0"

D. 'w''

What is the correct answer?

4

In evaluating a logical expression of type 'Boolean expression 1&& Boolean expression 2', both the Boolean expressions are not always evaluated.

A. True

B. False

What is the correct answer?

4

Which of the following methods belong to the String class?

A. length()

B. compareTo()

C. substring()

D. all of the them

What is the correct answer?

4

Submit button always fires doPost(...)

A. True

B. False

What is the correct answer?

4

A panel can not be added to another panel.

A. True

B. False

What is the correct answer?

4

The use of protected keyword to a member in a class will restrict its visibility as follows:

A. Visibility only in the class and its subclasses in the same package.

B. Visibility only inside the same package.

C. Visibility in all classes in the same package and subclasses in other packages.

D. Visibility only in the class where it is declared.

What is the correct answer?

4

If you want to assign a value of 99 to the variable year, then which of the following lines can be used within an <applet> tags?

A. number=getParameter(99)

B. <number==99>

C.

D. <param = radius value ==99>

What is the correct answer?

4

In order to connect to a database through java program we must create _______-

A. Connection, Statement, ResultSet

B. Connection, ResultSet

C. Statement< ResultSet

D. Connection, Statement

What is the correct answer?

4

Which of the following keywords are used to control access to a class member?

A. default

B. protected

C. interface

D. None of the above

What is the correct answer?

4

Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously

A. True

B. False

What is the correct answer?

4

Servlet can have ___________

A. get method and post method

B. get method or post method

C. Either of the above

What is the correct answer?

4

class.forName(...) creates an instance of java ODBC driver

A. True

B. False

What is the correct answer?

4

The break statement is required in the default case of a switch selection structure.

A. True

B. False

What is the correct answer?

4

Objects are passed to a method by use of call-by-reference.

A. True

B. False

What is the correct answer?

4

The programmer must explicitly create the system .in and system .out objects.

A. True

B. False

What is the correct answer?

4

Which of the following are the wrapper classes?

A. Random

B. Vector

C. Byte

D. all of the above

What is the correct answer?

4

Which of the following methods can be used to draw the outline of a square?

A. fillRect()

B. drawLine()

C. drawString()

D. all of the above

What is the correct answer?

4

It is perfectly legal to assign a subclass object to a supper class reference.

A. True

B. False

What is the correct answer?

4

Two methods cannot have the same name in Java.

A. True

B. False

What is the correct answer?

4

We can over load methods with differences only in their return type.

A. True

B. False