Java MCQ Questions - Java Basics

This section focuses on the "Basics" of Java programming. These Multiple Choice Questions (MCQ) should be practiced to improve the Java programming skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.

1. Java Source Code is compiled into ______________.

A. .Obj
B. Source Code
C. Bytecode
D. .Exe

View Answer


2. Enums were introduced in?

A. Java 4.0
B. Java 8.0
C. Java 5.0
D. Java 6.0

View Answer


3. Which of the following is used to interpret and execute Java Applet Classes hosted by HTML.

A. appletviewer
B. appletwatcher
C. appletshow
D. appletscreen

View Answer


4. HTML based Java Documentary help can be accessed using ______________.

A. javahelp
B. javamanual
C. javadoc
D. None of these

View Answer


5. Single line comment starts with _________ in Java.

A. /**
B. //
C. /*
D. None of these

View Answer


6. How to compile java code in command prompt?

A. javac filename.java
B. java filename.java
C. javac filename
D. java filename

View Answer


7. How to run java program in command prompt?

A. javac filename.java
B. java filename.java
C. javac filename
D. java filename

View Answer


8. Java is case sensitive?

A. True
B. False
C. Depends On Complier
D. May be true or false

View Answer


9. What is true in Java?

A. For all class names the first letter should be in Upper Case.
B. All method names should start with a Lower Case letter.
C. Name of the program file should exactly match the class name.
D. All of the above

View Answer


10. All Java components require names. Names used for classes, variables, and methods are called?

A. Variables
B. identifiers
C. Access Modifiers
D. Java Modifiers

View Answer






Also check :

Discussion


* You must be logged in to add comment.