Category Archives

Abstract Classes in Java

In C++, if a class has at least one pure virtual function, then the class becomes abstract. Unlike C++,...

Abstract Classes in Java

In C++, if a class has at least one pure virtual function, then the class becomes abstract. Unlike C++,...

Interfaces in Java

Like a class, an interface can have methods and variables, but the methods declared in an interface are by...

Interfaces in Java

Like a class, an interface can have methods and variables, but the methods declared in an interface are by...

Chained Exceptions in Java

Chained Exceptions allows to relate one exception with another exception, i.e one exception describes cause of another exception. For...

Chained Exceptions in Java

Chained Exceptions allows to relate one exception with another exception, i.e one exception describes cause of another exception. For...

Multicatch in Java

Prior to Java 7, we had to catch only one exception type in each catch block. So whenever we...

Multicatch in Java

Prior to Java 7, we had to catch only one exception type in each catch block. So whenever we...

User-defined Custom Exception in Java

Java provides us facility to create our own exceptions which are basically derived classes of Exception. For example MyException...

User-defined Custom Exception in Java

Java provides us facility to create our own exceptions which are basically derived classes of Exception. For example MyException...

throw and throws in Java

throw The throw keyword in Java is used to explicitly throw an exception from a method or any block...

throw and throws in Java

throw The throw keyword in Java is used to explicitly throw an exception from a method or any block...