Home
Current Affairs January 2024

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

Correct Answer :

C. Unicode characters are all 16 bits.


Related Questions

What is the correct answer?

4

JSP files creates ________________

A. html files

B. html files and java files

C. java files and class files

D. None of the above.

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");

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 import statement is always the first no comment statement in a Java program files.

A. True

B. False

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

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

A. True

B. False

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

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

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

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

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

Throwing an exception always causes program termination.

A. True

B. False

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

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

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

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

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

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

Declaring a method synchronized guarantees that the deadlock cannot occur.

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

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

In evaluating a logical expression of type 'Boolean expression 1&& Boolean expression 2', both the Boolean expressions are not always evaluated.

A. True

B. False

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

A package is a collection of

A. classes

B. interface

C. editing tools

D. classes and interfaces

What is the correct answer?

4

Java is fully object oriented programme.

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

Two methods cannot have the same name in Java.

A. True

B. False

What is the correct answer?

4

What is error in the following class definitions? 
abstract class xy { 
abstract sum(int x, int y) {
}
}

A. class header is not define properly

B. constructor is no defined

C. method is not defined properly

D. no error