Home
Current Affairs January 2024

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

Correct Answer :

C. Either of the above


Related Questions

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

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

In RMI before running the client program we must start RMI Registry.

A. True.

B. False.

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

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

In RMI we invoke client method from remote server

A. True

B. False

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

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

A. True

B. False

What is the correct answer?

4

Which of the following will produce a value of 22 if x=22.9:

A. Ceil(x)

B. Round(x)

C. Rint(x)

D. Abs(x)

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

Which of the following methods can be used to remove a component from the display?

A. remove()

B. desappear()

C. hide()

D. move()

What is the correct answer?

4

Declaring a method synchronized guarantees that the deadlock cannot occur.

A. True

B. False

What is the correct answer?

4

Consider the following statements:
int x = 10, y = 15; 
x = ((x < y) ? (y + x) : (y - x);

What will be the value of x after executing these statements?

A. 25

B. 15

C. 5

D. Error can't be executed.

What is the correct answer?

4

For all insert, update, delete, query operations on a database, ResultSet object creation is mandatory.

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

Which of the following are not keywords?

A. NULL

B. Implements

C. Protected

D. None of the above

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

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

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

A. True

B. False

What is the correct answer?

4

DataInput is

A. An abstract class defined is java.io.

B. A class we can use to read primitive data types.

C. An interface that defines methods to open files.

D. An interface that defines methods to read primitive data types.

What is the correct answer?

4

Java always provides a default constructor to a class.

A. True

B. False

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

In a single Servlet class we can use____________

A. doGet(...) method only

B. doPost(...) method only

C. doGet(...) method and doPost(...) method both at a time.

D. Either 'a' or 'b'

What is the correct answer?

4

Which exception is thrown by the read() method of InputStream class?

A. IOException

B. FileNotFoundException

C. ReadException

D. None of the above

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

A string object can not be modified after it is created.

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

To delete a file, we can use an instance of class file.

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

It is perfectly legal to refer to any instance variable inside of a static method.

A. True

B. False