Home
Current Affairs January 2024

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''

Correct Answer :

A. "rw"


Related Questions

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

A package is a collection of

A. classes

B. interface

C. editing tools

D. classes and interfaces

What is the correct answer?

4

Declarations can appear anywhere in the body of a Java method.

A. True

B. False

What is the correct answer?

4

A class may be both abstract and final.

A. True

B. False

What is the correct answer?

4

Which key word can protect a class in package from accessibility by the classes outside the package?

A. private

B. protected

C. final

D. don't use any keyword at all(make it default)

What is the correct answer?

4

The import statement is always the first no comment statement in a Java program files.

A. True

B. False

What is the correct answer?

4

Which of the following statements are valid array declarations?

A. int number();

B. float average[];

C. double[] marks;

D. counter int[];

What is the correct answer?

4

The name of the RMI compiler is ___________

A. rmicom

B. rmic

C. jrmi

D. none of the above

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

We can add more than one class(es) at the time of compilation Java Beans.

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

forName() is a static factory method

A. True

B. False

What is the correct answer?

4

Consider the following class definitions:
 class maths { 
student student1;
}
class student {
String name;
}

This code represents:

A. an 'is a' relationship

B. a 'has a' relationship

C. both

D. neither

What is the correct answer?

4

The modulus operator (%) can be used only with Integer operands.

A. True

B. False

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 represent legal flow control statements?

A. break;

B. break();

C. continue(inner);

D. all of the above

What is the correct answer?

4

Connection, Statement are interfaces and ResultSet is a class.

A. True.

B. False.

What is the correct answer?

4

A variable declared inside the for loop control can not be referenced out side the loop.

A. True

B. False

What is the correct answer?

4

The default case is always required in the switch selection structure.

A. True

B. False

What is the correct answer?

4

Which of the following methods can be used to change the size of a
size() *
resize()

A. component

B. dimension()

C. setSize()

D. size()

What is the correct answer?

4

A constructor must always invoke its supper class constructor in its first statement.

A. True

B. False

What is the correct answer?

4

What is error in the following class definitions? 
abstract class xy { 
abstract sum(int x, int y) {
}
}

A. class header is not define properly

B. constructor is no defined

C. method is not defined properly

D. no error

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

Any method in a supper class can be over ridden in its subclass.

A. True

B. False

What is the correct answer?

4

Submit button always fires doPost(...)

A. True

B. False

What is the correct answer?

4

Which of the following are keywords?

A. integer

B. default

C. Boolean

D. Object

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

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

With javadoc, which of the following denotes a javadoc comment?

A. //#

B. /*

C. /**

D. //**

What is the correct answer?

4

When we implement an interface method, it should be declared as public.

A. True

B. False