MCQs > IT & Programming > Software Engineering MCQs > Java Programming MCQs

Java Programming MCQ

1. When a numeric variable is concatenated to a string, the entire expression becomes a(n) ____.

Answer

Correct Answer: String

Note: This Question is unanswered, help us to find answer for this one

2. The statement system.out.printf("%10s", 123456) outputs ________. (note: * represents a space)

Answer

Correct Answer: B

Note: This Question is unanswered, help us to find answer for this one

3. The signature of a method consists of ____________.

Answer

Correct Answer: Method name and parameter list

Note: This Question is unanswered, help us to find answer for this one

4. The setonaction method is defined in ________.

Answer

Correct Answer: ButtonBase

Note: This Question is unanswered, help us to find answer for this one

5. The expression "java " + 1 + 2 + 3 evaluates to ________.

Answer

Correct Answer: Java 123

Note: This Question is unanswered, help us to find answer for this one

6. The capability to inherit from more than one class is called ____.

Answer

Correct Answer: Multiple inheritance

Note: This Question is unanswered, help us to find answer for this one

7. A class that cannot be instantiated is called a/an ____.

Answer

Correct Answer: Abstract class.

Note: This Question is unanswered, help us to find answer for this one

8. (int)(math.random() * (65535 + 1)) returns a random number ________.

Answer

Correct Answer: Between 0 and 65535

Note: This Question is unanswered, help us to find answer for this one

search