The Java Debugger (JDB) Interview Questions & Answers

  1. Question 1. What Is (jdb) Java Debugger?

    Answer :

    (JDB) Java debugger is a command line Java debugging tool used to debug Java programs without the requirement of inserting specific debugging instructions into the code.

  2. Question 2. What Are The Advantages Of Java Debugger?

    Answer :

    These are some advantages of Java Debugger: –

    • It is a lightweight debugging tool.
    • It is free to use and available for all type of operating systems.
    • The execution of Java debugging tool is very fast.
    • It provide support for multithreaded programs and remote applications.
  3. Adv Java Interview Questions

  4. Question 3. What Are Some Frequently Generate Bugs?

    Answer :

    These are some commonly generate bugs: –

    Syntactic or Compilation errors – These errors are generally generated due to some typing mistakes.

    Run-time errors – These errors are generated at execution time generally due to exceptions.

    Threading errors – These errors are difficult to replicate and track down.

  5. Question 4. What Are The Different Approaches Of Debugging?

    Answer :

    Various types of approaches used for debugging are: –

    • Optimized code debugging
    • Using comments
    • Basic Java bytecode (by using System.out.println() )
    • Remote Debugging
    • Debugging on demand
  6. Adv Java Tutorial

  7. Question 5. How To Connect Jdbc With Java?

    Answer :

    There are various ways to connect JDBC with JAVA but the simplest one is to provide the following command at the runtime of your main class:-

    >jdbc Main Class

  8. Core Java Interview Questions

  9. Question 6. What Is The Role Of Interpreter In Debugging The Java Program?

    Answer :

    Java debugger interacts with the Java runtime interpreter to interrupt the normal flow of program. Thus, Java interpreter provides support to debugger.

  10. Question 7. What Is The Syntax Used To Invoke The Debugger?

    Answer :

    The following syntax is required to invoke debugger: –

    jdb [options] [classname] [arguments]

  11. Core Java Tutorial
    JDBC Interview Questions

  12. Question 8. How Can We Debug An Applet?

    Answer :

    To debug an applet we have to execute the debugger within applet viewer by the help of following command: –

    >appletviewer -debug URL

  13. Question 9. How Can We Start The Execution Of Main Class?

    Answer :

    To start the execution of main class you just need to execute the below command: –

    >run [class [args]] 

    It is optional to mention the name of specific class and argument.

  14. CorelDRAW Interview Questions

  15. Question 10. Which Command Is Used To Complete The Remaining Execution?

    Answer :

    Use the following command to complete the partial execution of program: –


  16. JDBC Tutorial

  17. Question 11. What Is The Difference Between Print And Dump Command?

    Answer :

    The print command is used to display the value of expressions whereas dump command is used to display the information of objects.

  18. EJB(Enterprise JavaBeans) Interview Questions

  19. Question 12. What Is The Purpose Of Breakpoints In Java Debugger?

    Answer :

    Breakpoints are used in debugging to pause or stop the execution of a program at a specific line of code and test whether the program is functioning correctly or not.

  20. Adv Java Interview Questions

  21. Question 13. What Is The Syntax Used To Set A Breakpoint?

    Answer :

    A breakpoint can be set either on the basis of method name or specific number of line.

    To set a breakpoint on method, the following syntax is used: –

    stop in Classname.MethodName  

    To set a breakpoint on specific line, the following syntax is used:

    stop at Classname:LineNumber  

  22. EJB(Enterprise JavaBeans) Tutorial

  23. Question 14. What Are The Various Techniques Of Stepping?

    Answer :

    These are the following techniques of stepping: –

    • Step Over
    • Step Into
    • Step Return
  24. Question 15. What Is Stepping In Java Debugger?

    Answer :

    In JDB, Stepping is a procedure to execute the code line by line. Thus, through this approach each line of the code can be examined properly.

  25. Hibernate Interview Questions

  26. Question 16. Can We Handle Exceptions Through Jdb?

    Answer :

    Yes, Java debugger is capable of handling runtime exceptions. To handle these exceptions it provides catch command.

  27. Hibernate Tutorial

  28. Question 17. What Is A Debugger?

    Answer :

    A debugger is a computer program used to identify and remove errors from other programs.

  29. Java Developer Interview Questions

Comments are closed.