MCQ 1 What is the error in the following class definitions?
abstract class XY { abstract sum(int x, int y){ } }
MCQ 2 What are the part in executing a Java program and their purposes?
MCQ 3 State true of false.
MCQ 4 In java a ___________ is a sequence of characters.
MCQ 5 Java programs perform I/O through _______________.
MCQ 6 Which of the following methods belong to the string class?
MCQ 7 If m and n are int type variables, what will be the result of the expression m%n
when m=5 and n=2 ?
MCQ 8 State true of false.
MCQ 9 Using which keyword we can access value of the instance variables and class variables of that class inside the method of that class itself.
MCQ 10 If a variable is declared final, it must include _____________value.
MCQ 11 Methods can be overloaded with a difference only in the type of the return value.
MCQ 12 The keywords reserved but used in the initial version of Java are
MCQ 13 Method overriding is combination of _____________ and _______________?
MCQ 14 Which component is used to compile, debug and execute java program?
MCQ 15 Native protocol pure Java converts ________________ into the ______________ used by DBMSs directly.
MCQ 16 Which is the root class of all AWT events
MCQ 17 What will be the result of compiling following code.
public class MyClass{
public static void main(String args[]){
System.out.println("In first main()”); } public static void main(char args[]){ System.out.println (‘a’);}}
MCQ 18 Consider the following code
if(number>=0) if(number>0) system.out.println(“Number is positive”); else system.out.println(“Number is negative”);
What will be the output if number is equal to 0?
MCQ 19 A _____________ class may not have any abstract method.
MCQ 20 A ______________ object cannot be modified after it is created.
MCQ 21 Every method of a ______________ is implicitly final.
MCQ 22 A _____________ is a small unit of process.
MCQ 23 Which method Drops all changes made since the previous commit/rollback?
MCQ 24 Which one of the following is not a wrap class?
MCQ 25 The java visibility modifier is