Java Programming Questions & Answers: part2

Software Programming : Java Programming QUESTIONS AND ANSWERS :: part2 : 1 to 5

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

1.A protected member can be accessed in,

a subclass of the same package
a non-subclass of the same package
a non-subclass of different package
a subclass of different package
the same class.

2.What is the output of the following code: class eq { public static void main(String args[]) { String s1 = “Hello”; String s2 = new String(s1); System.out.println(s1==s2); } }


3.What is byte code in the context of Java?

The type of code generated by a Java compiler.
The type of code generated by a Java Virtual Machine.
It is another name for a Java source file.
It is the code written within the instance methods of a class.
It is another name for comments written within a program.

4.When an overridden method is called from within a subclass, it will always refer to the version of that method defined by the

Super class
Compiler will choose randomly
Interpreter will choose randomly
None of the abvove.

5.Mark the incorrect statement from the following:

Java is a fully object oriented language with strong support for proper software engineering techniques
In java it is not easy to write C-like so called procedural programs
In java language objects have to be manipulated
In java language error processing is built into the language
Java is not a language for internet programming.

More Java Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
The only place where success comes before work is in the dictionary.- Vidal Sassoon