Java Programming Questions & Answers: part4



Software Programming : Java Programming QUESTIONS AND ANSWERS :: part4 : 11 to 15

Following Software Programming language Entrance Multiple choice objective type questions and answers will help you in Software Programming 2024 examinations :

11.In a class definition, the special method provided to be called to create an instance of that class is known as a/an

Interpreter
Destructor
Constructor
Object
Compiler.

12.Consider the following Java program : public class Compute { public static void main (string args [ ]) { int result, x ; x = 1 ; result = 0; while (x < = 10) { if (x%2 = = 0) result + = x ; + + x ; } System.out.println(result) ; } } Which of the following will be the output of the above program?

55
30
25
35
45.

13.Which of the following statements about Java Threads is correct?

Java threads don’t allow parts of a program to be executed in parallel
Java is a single-threaded language
Java’s garbage collector runs as a high priority thread
Ready, running and sleeping are three states that a thread can be in during its life cycle
Every java application is not multithreaded.

14.In object oriented programming, composition relates to

The use of consistent coding conventions
The organization of components interacting to achieve a coherent, common behavior
The use of inheritance to achieve polymorphic behavior
The organization of components interacting not to achieve a coherent common behavior
The use of data hiding to achieve polymorphic behavior.

More Java Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
A real entrepreneur is somebody who has no safety net underneath them. Henry Kravis