Basic Java : MCQ [ 2150704 ]
- Which of the following is not a feature of Java? a) Platform independence b) Object-oriented programming c) Dynamic binding d) Multiple inheritance
Answer: d) Multiple inheritance
https://play.google.com/store/apps/details?id=com.javamcq.programs.interviewcomputerbitsdaily
- Which of the following is not a primitive data type in Java? a) byte b) int c) float d) string
Answer: d) string
- What is Byte Code in Java? a) The code generated by a Java compiler b) The code generated by a C++ compiler c) The code generated by a Python compiler d) The code generated by a PHP compiler
Answer: a) The code generated by a Java compiler
- What is the purpose of the Java Virtual Machine (JVM)? a) To compile Java code into Byte Code b) To execute Byte Code on any platform c) To debug Java code d) To write Java code
Answer: b) To execute Byte Code on any platform
- What does JDK stand for in Java? a) Java Development Kernel b) Java Development Kit c) Java Debugging Kit d) Java Deployment Kit
Answer: b) Java Development Kit
- Which of the following is not a relational operator in Java? a) < b) <= c) != d) **
Answer: d) **
- Which control statement is used to execute a block of code repeatedly until a condition is met? a) if-else b) switch c) while d) for
Answer: c) while
- Which control statement is used to execute a block of code a fixed number of times? a) while b) do-while c) for d) switch
Answer: c) for
- Which control statement is used to exit a loop prematurely? a) break b) continue c) return d) exit
Answer: a) break
Get Willamswhite’s stories in your inbox
Join Medium for free to get updates from this writer.
https://play.google.com/store/apps/details?id=com.javamcq.programs.interviewcomputerbitsdaily
- Which control statement is used to skip to the next iteration of a loop? a) break b) continue c) return d) exit
Answer: b) continue
https://play.google.com/store/apps/details?id=com.javamcq.programs.interviewcomputerbitsdaily






