1. Which provides runtime environment for java byte code to be executed?
A . JDK
B . JVM
C . JRE
D . JAVAC
2. Which variables are created when an object is created with the use of the keyword `new` and destroyed when the object is destroyed?
A . Local variables
B . Instance variables
C . Class Variables
D . Static variables
3. Choose a Single Line Comment in Java Language below?
A . //Some comments
B . Some comments//
C . /*Some comments*/
D . */Some comments/*
4. A valid identifier in Java language may contain which characters?
A . 0-9
B . A-Z, a-z
C . $, _ (Underscore)
D . All the above
5. In Java, Multi-line comments are represented by _____________
A . //
B . /* */
C . /# #/
D . */ */
6. The Primitive data types in java are ____________________
A . Pre-defined data types
B . User-defined data types
C . Both
D . None of the above
7. Which of the following expression is an invalid?
A . int Abc = 12;
B . String full_name = "yourname";
C . float 4d = 12.3f;
D . double d$ = 1234.456d;
8. In java, The instance variable is declared ____________________.
A . inside the method
B . inside class but outside the method
C . inside class but outside the method and it is static
D . outside the class
9. A data type is converted into another data type by the programmer is known as ____________?
A . Type Conversion
B . Implicit conversion
C . Type Casting
D . None of the above
10. Which one is true about a constructor ?
A . A constructor must have the same name as the class it is declared within.
B . A constructor is used to Initialize the objects.
C . A constructor may be declared private
D . All of the above
11. What are the keywords used to implement a SWITCH case in Java language?
A . switch, case
B . default
C . break
D . All
12. Which of the following statement is invalid?
A . break - immediately jumps to end of the loop
B . continue - immediately jumps to next interation
C . while loop - if the number of iterations are not fixed
D . for loop - if the number of iterations are not fixed
13. Which of the following array declaration is invalid?
A . Datatype array_name[] = new DataType[size];
B . Datatype[] array_name = new DataType[size];
C . Datatype array_name[] = {val1,val2,val3,......valn};
D . Datatype array_name[] = new DataType[];
14. Do you want to access the data members of a class, you have to create ___________?
A . an object
B . a variable
C . a method
D . an array
15. In java, the String class is comes under ___________ package?
A . javio
B . javlang
C . javutil
D . javString
16. In java, the System class is comes under ___________ package?
A . javio
B . javlang
C . javutil
D . javString
17. In java, the Scanner class is comes under ___________ package?
A . javio
B . javlang
C . javutil
D . javString
18. In java, the Console class is comes under ___________ package?
A . javio
B . javlang
C . javutil
D . javString
19. Which of these is an incorrect Statement?
A . It is necessary to use new operator to initialize an array
B . Array can be initialized using comma separated expressions surrounded by curly braces
C . Array can be initialized when they are declared
D . None of the mentioned
20. In a .java file, how many numbers of public types namely class, interface or abstract can be managed?
A . 1
B . 2
C . 3
D . Any number
21. An ELSE or ELSE-IF statement in Java can not exist alone without IF statement(TRUE or FALSE) _________________________?
22. In Java, an array can be declared without initialization & without mentioning the size(TRUE or FALSE) ________________________
23.A local variable declared inside a method can not be used in expressions without initializing it first.(TRUE or FALSE)_________________________?
24.To successfully overload a method in Java, the argument-list or parameter-list must be ______________?
25. If you import "packagename.classname" then ___________ of this package will be acc
☞ Java Programming Objective Type Question Bank - [ Java Programming ]
☞ Java Programming Objective Type Questions-Part-1 - [ Java Programming ]
☞ Java Programming Objective Type Questions-Part-2 - [ Java Programming ]
☞ Java Programming Objective Type Questions-Part-3 - [ Java Programming ]
☞ Java Programming Objective Type Questions-Part-4 - [ Java Programming ]
☞ Java Programming Objective Type Questions-Part-5 - [ Java Programming ]
☞ R - Programming MCQs - Unit-1 - [ R-Programming ]
☞ R - Programming MCQs - Unit-2 - [ R-Programming ]
☞ R - Programming MCQs - Unit-3 - [ R-Programming ]
☞ R - Programming MCQs - Unit-4 - [ R-Programming ]
☞ R - Programming MCQs - Unit-5 - [ R-Programming ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-1 - [ FLAT ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-2 - [ FLAT ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-3 - [ FLAT ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-4 - [ FLAT ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-5 - [ FLAT ]
☞ PPS MCQs - Unit-1 - [ PPS ]
☞ PPS MCQs - Unit-2 - [ PPS ]
☞ PPS MCQs - Unit-3 - [ PPS ]
☞ PPS MCQs - Unit-4 - [ PPS ]
☞ PPS MCQs - Unit-5 - [ PPS ]
☞ Object Oriented Programming through Java MCQs - Unit-1 - [ OOP_JAVA ]
☞ Object Oriented Programming through Java MCQs - Unit-2 - [ OOP_JAVA ]
☞ Object Oriented Programming through Java MCQs - Unit-3 - [ OOP_JAVA ]
☞ Object Oriented Programming through Java MCQs - Unit-4 - [ OOP_JAVA ]
☞ Object Oriented Programming through Java MCQs - Unit-5 - [ OOP_JAVA ]
☞ Design and Analysis of Algorithms MCQs - Unit-1 - [ DAA ]
☞ Design and Analysis of Algorithms MCQs - Unit-2 - [ DAA ]
☞ Design and Analysis of Algorithms MCQs - Unit-3 - [ DAA ]
☞ Design and Analysis of Algorithms MCQs - Unit-4 - [ DAA ]
☞ Design and Analysis of Algorithms MCQs - Unit-5 - [ DAA ]
☞ Software Engineering MCQs - Unit-1 - [ SE ]
☞ Software Engineering MCQs - Unit-2 - [ SE ]
☞ Software Engineering MCQs - Unit-3 - [ SE ]
☞ Software Engineering MCQs - Unit-4 - [ SE ]
☞ Software Engineering MCQs - Unit-5 - [ SE ]
☞ Data Mining MCQs - Unit-1 - [ DM ]
☞ Data Mining MCQs - Unit-2 - [ DM ]
☞ Data Mining MCQs - Unit-3 - [ DM ]
☞ Data Mining MCQs - Unit-4 - [ DM ]
☞ Data Mining MCQs - Unit-5 - [ DM ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-1 - [ COA ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-2 - [ COA ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-3 - [ COA ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-4 - [ COA ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-5 - [ COA ]
☞ Data Structures Objective Type Question Bank-Unit-1 - [ DS ]
☞ Data Structures Objective Type Question Bank-Unit-2 - [ DS ]
☞ Data Structures Objective Type Question Bank-Unit-3 - [ DS ]
☞ Data Structures Objective Type Question Bank-Unit-4 - [ DS ]
☞ Data Structures Objective Type Question Bank-Unit-5 - [ DS ]
☞ Database Management System Objective Type Question Bank-Unit-1 - [ DBMS ]
☞ Database Management System Objective Type Question Bank-Unit-2 - [ DBMS ]
☞ Database Management System Objective Type Question Bank-Unit-3 - [ DBMS ]
☞ Database Management System Objective Type Question Bank-Unit-4 - [ DBMS ]
☞ Database Management System Objective Type Question Bank-Unit-5 - [ DBMS ]