Abstract Class in Java

Abstract class in Java is a class that is declared using abstract keyword. Abstract class can have regular methods (methods with method body) as well as abstract methods (methods without method body and having abstract specifier). Table of contents General form of abstract class in Java When is abstract class…

Continue reading

Interface in Java

Interface in Java helps to fully abstract the implementation of the class. Interfaces act as a contract for the class, detailing what methods can be invoked by any outside entity without actually providing what methods should do. The class implementing an interface has to provide the behavior (implement the methods…

Continue reading

JShell in Java

The Java Shell or JShell is an interactive command line tool for learning the Java programming language and to test Java code. JShell is a Read-Evaluate-Print Loop (REPL), which evaluates declarations, statements, and expressions as they are typed and immediately shows the results. This way you don’t need to write…

Continue reading

Array in Java

In this post we’ll talk about one of the programming construct; Array in Java. Topics covered are how to declare an array, how to create and initialize an array, how to store elements in an array and how to access those elements using array indexes, types of arrays in Java.…

Continue reading