1. JVM Stands for ___________. 6. Java NetBeans IDE is ________ software.
a. Java Virtual Machine a. Close source
b. Java Verify Machine b. Middle source c. Java Vector Machine c. Open Source d. None of the above d. None of the above Hide Answer ⟵ Hide Answer ⟵ a. Java Virtual Machine c. Open Source 2. Java programs are _____________. 7. How we can write comments in Java programs. a. Platform Independent a. Two forward slashes (//) b. Highly Portable b. /* and */ c. Both a) and b) c. Both a) and b) d. None of the above d. None of the above Hide Answer ⟵ Hide Answer ⟵ c. Both a) and b) c. Both a) and b) 3. Java support __________. 8. In Java a group of related classes is known as _______. a. Compiler a. Group b. Interpreter b. Package d. Assembler c. Method e. None of the above d. None of the above Show Answer ⟶ Hide Answer ⟵ 4. Java converts the program in __________. b. Package a. Byte 9. In Java most common pre-built Java output methods are b. Megabyte ___________. c. Bytecode a. System.out.println(); d. None of the above b. Public class Hide Answer ⟵ c. Public static void main(String[] args) c. Bytecode d. None of the above Fundamentals of Java Class 12 MCQ Hide Answer ⟵ 5. IDE Stands for __________. a. System.out.println(); a. Integrated Developer Environments Fundamentals of Java Class 12 MCQ b. Integrated Development Environments 10. A Variable is a placeholder for data that can change its c. Internal Developer Environments value during program execution. d. Internal Development Environments a. Constant b. Variable Hide Answer ⟵ c. Data type d. None of the above b. Integrated Development Environments Hide Answer ⟵ b. Variable 11. In Java, How many types of primitive Data Type. 17. Boolean Data Type can store _________ bit of data. a. 6 a. 16-bit b. 7 b. 32-bit c. 8 c. 1-bit d. 9 d. 8-bit Hide Answer ⟵ Show Answer ⟶ c. 8 18. What are the naming rules we have to follow to declare 12. In Java, Which type of datatype is used to store Integer a variable. values. a. Variable names can begin with either an alphabetic character, a. Byte Underscore or a dollar sign. b. Int b. Space are not allowed in variable names c. Long c. Reserved words cannot be used as a variable name d. All of the above d. All of the above Hide Answer ⟵ Hide Answer ⟵ d. All of the above d. All of the above 13. Int Data Type can store ________ bit of data. 19. To store more than one character, we use the _______ data a. 8-bit type. b. 16-bit a. Integer c. 32-bit b. Character d. 64-bit c. String Hide Answer ⟵ d. None of the above c. 32-bit Show Answer ⟶ 14. Float Data Type can store ________ bit of data. Fundamentals of Java Class 12 MCQ a. 8-bit b. 16-bit c. 32-bit d. 64-bit 20. ___________ are special symbols in a programming Hide Answer ⟵ language and perform certain specific operations. c. 32-bit a. Operators Fundamentals of Java Class 12 MCQ b. Variable 15. Double Data Type can store ________ bit of data. c. Datatype a. 16-bit b. 32-bit c. 64-bit d. 8-bit d. None of the above Hide Answer ⟵ Hide Answer ⟵ c. 64-bit a. Operators 16. Char Datatype can store _________ bit of data. 21. ++ is known as which operator. a. 16-bit b. 32-bit c. 64-bit d. 8-bit a. Increment Operator b. Decrements Operator Hide Answer ⟵ c. Assignment Operator d. Modulus a. 16-bit Hide Answer ⟵ a. Increment Operator 22. Which of the following belongs to logical operators. c. Nested If a. && d. All of the above b. || Show Answer ⟶ c. ! 27. The ____________ is used to execute a block of code d. All of the above matching one value out of many possible values. Hide Answer ⟵ a. If statement d. All of the above b. Switch Statement 23. Which of the following is an example of selection c. For Statement structures. d. None of the above a. If else statement Hide Answer ⟵ b. Switch statement b. Switch Statement c. Else if statement 28. The ability of a computer to perform the same set of d. All of the above actions again and again is called looping. Hide Answer ⟵ a. Looping d. All of the above b. Actioning 24. The __________ in Java lets us execute a block of code c. Performing depending upon whether an expression evaluates to true or d. None of the above false. Hide Answer ⟵ a. If statements a. Looping b. For statements 29. What are the different looping statements available in c. Array Statements Java? d. None of the above a. For loop Hide Answer ⟵ b. While loop a. If statements c. Do-while loop Fundamentals of Java Class 12 MCQ d. All of the above 25. To combine two relational expressions in a program. Hide Answer ⟵ a. Logical OR d. All of the above b. Logical AND Fundamentals of Java Class 12 MCQ c. Logical NOT 30. The ________ statement evaluates the test before d. None of the above executing the body of a loop. Hide Answer ⟵ a. Goto b. Logical AND b. While loop 26. If inside the if is known as _________. c. Do-while loop a. Outer If d. All of the above b. Inner If Hide Answer ⟵ b. While loop 31. The __________ statement evaluates the test after 36. __________ helps to create a tab between the numbers in executing the body of a loop. the print statement. a. Goto a. \tt b. While loop b. \t c. Do-while loop c. \tb d. All of the above d. \tab Hide Answer ⟵ Hide Answer ⟵ c. Do-while loop b. \t 32. _________ is known as the entry control loop. 37. Array addresses always start from _________. a. While loop a. 0 b. Do-while loop b. 1 c. Goto loop c. 2 d. All of the above d. 3 Hide Answer ⟵ Hide Answer ⟵ a. While loop a. 0 33. __________ is known as the exit control loop. 38. OOP Stands for ____________. a. While loop a. Object Oriented Programming b. Do-while loop b. Outer Oriented Programming c. Goto loop c. Outer Object Programming d. All of the above d. Oriented Object Programming Hide Answer ⟵ Hide Answer ⟵ b. Do-while loop a. Object Oriented Programming 34. Which condition required for executing the loop – 39. Java’s most fundamental features are _________. a. Initial value a. Class b. Condition b. Objects c. Counter c. Both a) and b) d. All of the above d. None of the above Hide Answer ⟵ Hide Answer ⟵ d. All of the above c. Both a) and b) Fundamentals of Java Class 12 MCQ Fundamentals of Java Class 12 MCQ 35. __________ are variables that can hold more than one 40. Function declared inside the class is known as __________. value, they can hold a list of values of the same type. a. Member function b. Inner function a. Loop b. Constant c. Outer function d. None of the above c. Variable d. None of the above Hide Answer ⟵ Hide Answer ⟵ a. Member function c. Variable 41. The body of class is enclosed within ____________. 46. Data members and method members of an object are a. Small braces accessed using the _________ operator. b. Curly braces a. Comma (,) c. Big braces b. Dot (.) d. None of the above c. Modular (%) Hide Answer ⟵ d. Dollar ($) b. Curly braces Hide Answer ⟵ 42. The variable declared outside the class is known as b. Dot (.) ___________. 47. Data members of a class can be accessed from outside a. Local variable the class by default. Identify the access modifiers from the b. Global variable below list __________. c. Inner variable a. Private d. All of the above b. Public Hide Answer ⟵ c. Protected b. Global variable d. All of the above 43. The variable declared inside the class is known as Hide Answer ⟵ __________. d. All of the above a. Local variable 48. Private data members of a class cannot be accessed b. Global variable outside the class however, you can give controlled access to c. Inner variable data members outside the class through ____________. d. All of the above a. Getter Hide Answer ⟵ b. Setter a. Local variable c. Both a) and b) 44. __________ is a data member that is declared but not d. None of the above initialized before using, and is assigned a default value by Hide Answer ⟵ the compiler, usually either zero or null. c. Both a) and b) a. Class b. Object c. Constructors d. None of the 49. To import the class from the package, you have to use above ____________ keyword. Hide Answer ⟵ a. Insert c. Constructors b. Import Fundamentals of Java Class 12 MCQ c. Add 45. __________ has the same name as the class. d. None of the above a. Class b. Object c. Constructors Hide Answer ⟵ d. None of the above b. Import Hide Answer ⟵ c. Constructors Fundamentals of Java Class 12 MCQ c. touppercase() 50. We can take input from the user using ___________ object. d. None of the above a. Scanner Hide Answer ⟵ b. System.out.println(); a. toUpperCase() c. Both a) and b) Fundamentals of Java Class 12 MCQ d. None of the above 55. __________ function helps to return a new string after Hide Answer ⟵ replacing all occurrences of old string. a. Scanner a. replace() 51. _________ function helps to convert string value to the b. Change() integer value in Java. c. Convert() a. parseInt(); d. None of the above b. parseDouble() Hide Answer ⟵ c. parseString(); a. replace() d. None of the above 56. ________ function helps to return the length of the string. Hide Answer ⟵ a. replace() a. parseInt(); b. isEmpty() 52. To sort the array of integers in ascending order _______ c. indexOf() function required. d. None of the above a. Arrange() Hide Answer ⟵ b. Filter() a. replace() c. Sort() 57. _______ function helps to return the index of the first d. None of the above occurrence of a given substring. Hide Answer ⟵ a. length() c. Sort() b. isEmpty() 53. __________ function helps to convert all of the characters c. indexOf() in lower case. d. None of the above a. toLowerCase() Show Answer ⟶ b. toSmallCase() 58. When unexpected errors come in the program it is c. to BelowCase() handled by ___________. d. None of the above a. Error handling Hide Answer ⟵ b. Exception handling a. toLowerCase() c. Both a) and b) 54. __________ function helps to convert all the characters in d. None of the above Upper case. Hide Answer ⟵ a. toUpperCase() b. Exception handling b. toCaptialCase() Fundamentals of Java Class 12 MCQ Fundamentals of Java Class 12 MCQ 60. Which keywords handle an exception in Java 65. What are the basic idea in exception handling programming. ____________. a. Try a. Denote an exception block b. Catch b. Catch the exception c. Both a) and b) c. Handle the exception d. None of the above d. All of the above Hide Answer ⟵ Hide Answer ⟵ c. Both a) and b) d. All of the above 61. _________ helps to access the network services that are 66. ___________ a file format based on the popular ZIP file running on the local computer. format and is used for aggregating many files into one. a. Localhost b. Local Network c. network a. Java ARchive (JAR) d. None of the above b. Java Bin (JB) Hide Answer ⟵ c. Java Method (JM) a. Localhost d. None of the above 62. What are the different ways to create threads in Java? Hide Answer ⟵ a. By extending the Thread class a. Java ARchive (JAR) b. By implementing the Runnable interface 67. JDBC Stands for ___________. c. Both a) and b) d. None of the above a. Java Data Connection b. Java Database Connection Hide Answer ⟵ c. Java Database Connectivity d. Java Data Connectivity c. Both a) and b) Hide Answer ⟵ 63. A ______________ is one that can perform multiple tasks c. Java Database Connectivity concurrently so that there is optimal utilization of the 68. An ___________ is a useful mechanism for effectively computer’s resources. identifying/detecting and correcting logical errors in a a. Resources program b. Multithreaded program program. When developing your Java programs. c. Class program d. None of the above a. Database Hide Answer ⟵ b. Assertion b. Multithreaded program c. Archive 64. What are the different types of passing values in Java? d. None of the above a. Pass by value & not Pass by reference Hide Answer ⟵ b. Pass by data & Pass by address b. Assertion c. Pass by String & Pass by reference d. None of the above Hide Answer ⟵ a. Pass by value & not Pass by reference