Read more

Throwable instance in JAVA

Creating Exceptions Two ways to obtain a Throwable instance: 1) creating one with the new operator All Java built-in exception…

Catching Exceptions in JAVA

Catching Exceptions: The try-catch Statements class DivByZero { public static void main(String args[]) { try { System.out.print…

Exceptions in JAVA

Exceptions • Exception is an abnormal condition that arises when executing a program. • In the languages that do not support e…

interface in JAVA

Defining an interface • Using interface, we specify what a class must do, but not how it does this. • An interface is syntactic…

Source File in JAVA

Java Source File Finally, a Java source file consists of: 1) a single package instruction (optional) 2) several import statemen…

Package in JAVA

Package A package is both a naming and a visibility control mechanism: 1) divides the name space into disjoint subsets It is …

Abstract Classes in JAVA

Abstract Classes • Java allows abstract classes – use the modifier abstract on a class header to declare an abstract class abst…

Polymorphism in JAVA

Polymorphism • Polymorphism is one of three pillars of object-orientation. • Polymorphism: many different (poly) forms of objec…

Class Hierarchy in JAVA

Class Hierarchy • Good class design puts all common features as high in the hierarchy as reasonable • The class hierarchy dete…

Load More
That is All