How do you debug your java program?

Answer Posted / vidhya

1. Debugging Java program is done using Sysout's.
2. If an error occurs and we are not able to guess where it
occurs, Sysout can be given line by line and checked.
3. One can use LogWriter/LogManager which will also help us
write into a file and see the error/exception.
4. One needs to import log4j.jar and log4j.xml/properties
file where the logfile name and path is specified.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi frnds how to lock an user when he enter wrong credentials more than 3 time using java or j2ee tech take username and password in a bean no need to connect DB and validate give me some sample application code or links its urgent for me thanks in advance

1866


my interviewer asked me what technical specification you used how to answer that question

1930


How do I find jre path in windows?

522


What are the differences between the java collection and the java list? : java collections

606


What are the queues in the java collection framework? : java collections

546






What is the use of the list interface in the java collection? : java collections

596


Which server-side script takes the input from JavaScript, can access the database if it needs to, and processes the data.

1592


What are the interfaces in java collections? : java collections

609


What are the considerations to be made in case of loops in java ?

564


Hi Friends , am newbie to ajax. For example just consider one account registration - A form contains 8 text fields with submit button. In this form second texbox contains "username " . On right side of text box there is a label box . On clilck action i need to determine user is available or not. Is it possible on clicking label or should i click submit button.

1579


What is the use of hashcode in java ?

573


HOW MUCH PERCENTAGE WE DEDUCT FOR OUR SUPPLIERS OR OTHER PROFESSIONALS

1576


What are the different types of ways where you can iterate over a list? : java collections

572


Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword

1608


What is the enumerator of the java collection framework? : java collections

561