Home
Current Affairs January 2024

What is the correct answer?

4

The expression (x == y && a<b) is true If either x == y is true or a<b is true.

A. True

B. False

Correct Answer :

B. False


Related Questions

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

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

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

It is an error to have a method with the same signature in both the super class and its subclass.

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 of the following control expressions are valid for an if statement?

A. an integer expression

B. a Boolean expression

C. either A or B

D. Neither A or B

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

The default case is always required in the 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

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

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

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

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

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

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

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

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

Declaring a method synchronized guarantees that the deadlock cannot occur.

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

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

When present, package must be the first no comment statement in the file.

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

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

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

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

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

forName() is a static factory method

A. True

B. False

What is the correct answer?

4

When we invoke repaint () for a Component, the AWT invokes the method:

A. draw()

B. update()

C. show()

D. paint()

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