Java Programming Questions & Answers: part2



Software Programming : Java Programming QUESTIONS AND ANSWERS :: part2 : 6 to 10

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

6.An overloaded method consists of,

The same method name with different types of parameters
The same method name with different number of parameters
The same method name and same number and type of parameters with different return type
Both (opt1) and (opt2) above
(opt1), (opt2) and (opt3) above.

7.The correct order of the declarations in a Java program is,

Package declaration, import statement, class declaration
Import statement, package declaration, class declaration
Import statement, class declaration, package declaration
Class declaration, import statement, package declaration
Class declaration, package declaration, import statement.

8.You read the following statement in a Java program that compiles and executes. submarine.dive(depth); What can you say for sure?

depth must be an int
dive must be a method.
dive must be the name of an instance field.
submarine must be the name of a class
submarine must be a method.

9.In java, objects are passed as

Copy of that object
Method called call by value
Memory address
Constructor
Default constructor.

10.The java run time system automatically calls this method while garbage collection.

finalizer()
finalize()
finally()
finalized()
none of the above.

More Java Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
Too many of us are not living our dreams because we are living our fears.- Les Brown