This set of Advanced Java Multiple Choice Questions & Answers (MCQs) focuses on “Debugging in Eclipse”.
1. Which mode allows us to run program interactively while watching source code and variables during execution?
a) safe mode
b) debug mode
c) successfully run mode
d) exception mode
View Answer
Explanation: Debug mode allows us to run program interactively while watching source code and variables during execution.
2. How can we move from one desired step to another step?
a) breakpoints
b) System.out.println
c) logger.log
d) logger.error
View Answer
Explanation: Breakpoints are inserted in code. We can move from one point to another in the execution of a program.
3. Which part stores the program arguments and startup parameters?
a) debug configuration
b) run configuration
c) launch configuration
d) project configuration
View Answer
Explanation: Launch configuration stores the startup class, program arguments and vm arguments.
4. How to deep dive into the execution of a method from a method call?
a) F3
b) F5
c) F7
d) F8
View Answer
Explanation: F5 executes currently selected line and goes to the next line in the program. If the selected line is a method call, debugger steps into the associated code.
5. Which key helps to step out of the caller of currently executed method?
a) F3
b) F5
c) F7
d) F8
View Answer
Explanation: F7 steps out to the caller of the currently executed method. This finishes the execution of the current method and returns to the caller of this method.
6. Which view allows us to delete and deactivate breakpoints and watchpoints?
a) breakpoint view
b) variable view
c) debug view
d) logger view
View Answer
Explanation: The Breakpoints view allows us to delete and deactivate breakpoints and watchpoints. We can also modify their properties.
7. What is debugging an application which runs on another java virtual machine on another machine?
a) virtual debugging
b) remote debugging
c) machine debugging
d) compiling debugging
View Answer
Explanation: Remote debugging allows us to debug applications which run on another Java virtual machine or even on another machine. We need to set certain flags while starting the application.
java -Xdebug -Xnoagent \ -Djava.compiler=NONE \ -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005.
8. What happens when the value of variable change?
a) changed value pop on the screen
b) variable changes are printed in logs
c) dump of variable changes are printed on the screen on end of execution
d) variable tab shows variables highlighted when values change
View Answer
Explanation: When a variable value changes, the value in variable tab is highlighted yellow in eclipse.
9. Which perspective is used to run a program in debug view?
a) java perspective
b) eclipse perspective
c) debug perspective
d) jdbc perspective
View Answer
Explanation: We can switch from one perspective to another. Debug perspective shows us the breakpoints, variables, etc.
10. How does eclipse provide the capability for debugging browser actions?
a) internal web browser
b) chrome web browser
c) firefox web browser
d) internet explorer browser
View Answer
Explanation: Eclipse provides internal web browser to debug browser actions.
Sanfoundry Global Education & Learning Series – Java Programming Language.
To practice all areas of Java language, here is complete set of 1000+ Multiple Choice Questions and Answers.
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Practice Information Technology MCQs
- Apply for Java Internship
- Check Java Books
- Practice BCA MCQs
- Check Programming Books