Abstract keyword in Java

Abstract in java is used to represent that there is no concrete implementation. The abstract keyword in Java is used to declare a class or a method as abstract. An ” abstract class ” can have abstract methods which have to be implemented by its concrete sub classes. An ” abstract method ” does not […]

Share this article on

Assertion keyword in Java

An assert is a keyword in Java which enables us to test our assumptions about our program. Assert will throw exception, If its expression evaluates to false and do nothing if it’s true. Syntax : assert Expression1 ; Where, Expression1 is a boolean expression. When the system runs the assertion, it evaluates Expression1 and if […]

Share this article on
< Previous