Home
Current Affairs January 2024

What is the correct answer?

4

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

A. True

B. False

Correct Answer :

A. True


Related Questions

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

Submit button always fires doPost(...)

A. True

B. False

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

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

forName() is a static factory method

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

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

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

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

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

The length of a string object 's1' can be obtained using the expression s1.length.

A. True

B. False

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

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

Session bean

A. Represents a single client inside the application server

B. Can not be shared

C. Is not persistent

D. Satisfies all of the above conditions

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 programmer must explicitly create the system .in and system .out objects.

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

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

A. True

B. False

What is the correct answer?

4

A thread can make second thread ineligible for execution by calling the suspend (-) method on second thread.

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

Give file is a file object, which of the following are legal statements to create a new file.

A. file.create();

B. FileOutputStream fos=new FileOutputStream(file);

C. FileInputStream fis=new FileInputStream(file);

D. all 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

What is wrong in the following class definitions? 
abstract class print { 
abstract show();
}
class Display extends print {
}

A. Nothing is wrong

B. Wrong Method show() should have a return type

C. Wrong Methods show() is not implemented in Display

D. Wrong Display does not contain any members.

What is the correct answer?

4

A JSP file can be stored_________________

A. With the extension .jsp in servlets folder of the jws

B. With the extension .html in public_html folder of the jws

C. With the extension .jsp in public_html folder of the jws

D. None of the above.

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

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

A Java monitor must either extend thread class or implement Runnable interface.

A. True

B. False

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

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

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