Read more

Throwable instance in JAVA

Creating Exceptions Two ways to obtain a Throwable instance: 1) creating one with the new operator…

Catching Exceptions in JAVA

Catching Exceptions: The try-catch Statements class DivByZero { public static void main(String args…

Exceptions in JAVA

Exceptions • Exception is an abnormal condition that arises when executing a program. • In the lan…

interface in JAVA

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

Source File in JAVA

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

Package in JAVA

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

Abstract Classes in JAVA

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

Polymorphism in JAVA

Polymorphism • Polymorphism is one of three pillars of object-orientation. • Polymorphism: many dif…

Class Hierarchy in JAVA

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

Load More
No results found