When should we create our own custom exception classes?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

public class Garbage { int a=0; public void add() { int c=10+20; System.out.println(c); System.out.println(a); } public static void main(String args[]) { Garbage obj=new Garbage(); System.gc(); System.out.println("Garbage Collected"); obj.add(); } } Above is a code in java used for garbage collection. object obj has been created for the class Garbage and system.gc method is called. Then using that object add method is called.System.gc method if called the obj should be garbage collected?

6 Answers  


What is the difference between inner class and nested class?

0 Answers  


What is the difference between state-based unit testing and interaction-based unit testing?

0 Answers  


What does %d do in java?

0 Answers  


What does replaceall do in java?

0 Answers  


Is singleton set an interval?

0 Answers  


What is size () in java?

0 Answers  


Can we define constructor in inner class?

0 Answers  


What is a static class in java?

0 Answers  


What is the file type?

0 Answers  


How to create a base64 decoder in java8?

0 Answers  


Break statement can be used as labels in java?

0 Answers  


Categories