Advanced Java Questions & Answers – Debugging in Eclipse

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

Answer: b
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

Answer: a
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

Answer: c
Explanation: Launch configuration stores the startup class, program arguments and vm arguments.
advertisement
advertisement

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

Answer: b
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

Answer: c
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.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

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

Answer: a
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

Answer: b
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.

advertisement
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

Answer: d
Explanation: When a variable value changes, the value in variable tab is highlighted yellow in eclipse.
advertisement

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

Answer: c
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

Answer: a
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]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.