Java Programming Questions & Answers: part1



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

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

6.Multiple inheritance means,

one class inheriting from more super classes
more classes inheriting from one super class
more classes inheriting from more super classes
None of the above
(opt1) and (opt2) above.

7.What is the output of the following program: public class testmeth { static int i = 1; public static void main(String args[]) { System.out.println(i+” , “); m(i); System.out.println(i); } public void m(int i) { i += 2; } }

1 , 3
3 , 1
1 , 1
1 , 0
none of the above.

8.Which of the following is true?

A finally block is executed before the catch block but after the try block.
A finally block is executed, only after the catch block is executed.
A finally block is executed whether an exception is thrown or not.
A finally block is executed, only if an exception occurs.
None of the above

9.The fields in an interface are implicitly specified as,

static only
protected
private
both static and final
none of the above.

10.Which one of the following is not true?

A class containing abstract methods is called an abstract class.
Abstract methods should be implemented in the derived class.
An abstract class cannot have non-abstract methods.
A class must be qualified as ‘abstract’ class, if it contains one abstract method.
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
If you are not willing to risk the usual you will have to settle for the ordinary- Jim Rohn