Home
Current Affairs January 2024

What is the correct answer?

4

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

A. //#

B. /*

C. /**

D. //**

Correct Answer :

C. /**


Related Questions

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

Which of the following are keywords?

A. integer

B. default

C. Boolean

D. Object

What is the correct answer?

4

What does the following line of code do?
TextField text=new TextField(10);

A. Creates text object that can hold 10 rows of text.

B. Creates text object that can hold 10 columns of text.

C. Creates the object text and initializes it with the value 10.

D. The code is illegal.

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

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

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

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 method declared as static can not access non-static class members.

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

Servlet has ___________

A. init method

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

C. All of the above methods.

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

A catch can have comma-separated multiple arguments.

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

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

It is an error if a class with one or more abstract methods is not explicitly declared abstract.

A. True

B. False

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

We would like to make a member of a class visible in all subclasses regardless of what package they are in. Which one of the following keywords would achieve this?

A. private

B. protected

C. public

D. private protected

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

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

When we implement the Runnable interface, we must define the method

A. start()

B. init()

C. runnable()

D. run()

What is the correct answer?

4

Every method of a final in class is implicitly final.

A. True

B. False

What is the correct answer?

4

executeUpdate(------------) returns ___________

A. Nothing

B. Returns a ResultSet object

C. Returns an integer value to show the no. of updated rows

D. None of the above.

What is the correct answer?

4

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

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

An individual array element that is passed to a method and modified in that method will contain the modified value when the called method completes execution.

A. True

B. False

What is the correct answer?

4

An EJB is a server-side component that encapsulates the business logic of an application

A. True

B. False

What is the correct answer?

4

All methods in an abstract class must be declared abstract.

A. True

B. False

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

The name of a Java program file must match the name of the class with the extension Java.

A. True

B. False