Home
Current Affairs January 2024

What is the correct answer?

4

A method declared as static can not access non-static class members.

A. True

B. False

Correct Answer :

A. True


Related Questions

What is the correct answer?

4

Which of the following command lines options generates documentation for all classes and methods?

A. -protected

B. -public

C. -private

D. -encoding

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

Any class may be inherited by another class in the same package.

A. True

B. False

What is the correct answer?

4

If m and n are int type variables, what will be the result of the expression
'm % n' when m = -14 and n = -3?

A. 4

B. 2

C. -2

D. -4

What is the correct answer?

4

Submit button always fires doPost(...)

A. True

B. False

What is the correct answer?

4

The concept of multiple inheritance is implemented in Java by

A. extending two or more classes

B. extending one class and implementing one or more interfaces

C. all the above

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

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 true?

A. UTF characters are all 24 bits.

B. Reader class has methods that can read integers and floats.

C. Unicode characters are all 16 bits.

D. all of the above

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

A static class method can be invoked by simply using the name of the method alone.

A. True

B. False

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

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

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

If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.

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

A class may be both abstract and final.

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

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

A. True

B. False

What is the correct answer?

4

Frames and applets cannot be used together in the same program.

A. True

B. False

What is the correct answer?

4

forName() is a static factory method

A. True

B. False

What is the correct answer?

4

Which of the following classes are available in the java.lang package?

A. Random

B. Stack

C. String Buffer

D. Vector

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

A catch can have comma-separated multiple arguments.

A. True

B. False

What is the correct answer?

4

Which javadoc tag is used to denote a comment for methods parameters?

A. @method

B. @parameter

C. @argument

D. @param

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

Java is fully object oriented programme.

A. true

B. false

What is the correct answer?

4

Servlet has ___________

A. init method

B. doGet(------) method

C. All of the above methods.

What is the correct answer?

4

DriverManager.getConnection("jdbc:odbc:dsn_name") method does not depend on the class.forName(...) method.

A. True.

B. False.

What is the correct answer?

4

Which are the valid ways to create DataInputStream streams?

A. new DataInputStream(new File("in.dat"));

B. new DataInputStream(new FileInputStream("in.dat"));

C. new DataInputStream("in.dat");

D. new DataInputStream("in.data","r");