Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What Is A Debugger?

Answer»

A DEBUGGER is a computer program USED to IDENTIFY and remove ERRORS from other PROGRAMS.

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

2.

Can We Handle Exceptions Through Jdb?

Answer»

YES, Java DEBUGGER is capable of handling RUNTIME EXCEPTIONS. To handle these exceptions it provides catch command.

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

3.

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.

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.

4.

What Are The Various Techniques Of Stepping?

Answer»

These are the FOLLOWING TECHNIQUES of STEPPING: -

These are the following techniques of stepping: -

5.

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

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

6.

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.

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.

7.

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.

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

8.

Which Command Is Used To Complete The Remaining Execution?

Answer»

Use the FOLLOWING command to COMPLETE the partial EXECUTION of program: -

>cont

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

>cont

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.

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.

10.

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

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

>appletviewer -debug URL

11.

What Is The Syntax Used To Invoke The Debugger?

Answer»

The following SYNTAX is required to INVOKE debugger: -

jdb [options] [CLASSNAME] [arguments]

The following syntax is required to invoke debugger: -

jdb [options] [classname] [arguments]

12.

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.

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

13.

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

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

14.

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

Various types of approaches used for debugging are: -

15.

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.

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.

16.

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.

These are some advantages of Java Debugger: -

17.

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.

(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.