How to exit a program in Java

In Java if we want to terminate the execution of the program then we make use of System.exit(n) method. Let us see important points : System.exit(n) method takes a non zero argument to indicate abnormal termination. System.exit(n) will exit the program irrespective of the operation being performed. If we call System.exit(n) within a try catch … Read more

Create a new Java project and program in Eclipse

In previous post we saw how to download eclipse and create a new workspace. Now let us see how to create a new Java project, program and run the program in Eclipse. Steps to create and run Java program : Step 1 : After eclipse has opened, a welcome screen will appear. You can explore … Read more

Right way to debug code using pen and paper

Anyone who is starting to code, the most difficult thing they face is to understand others code. If the code has 2-3 nested loops then even an experienced persons face a lot of problem. Understanding someone else’s code or code present on internet is very frustrating and takes a lot of time. So my advice … Read more