What is Abstract Class in Java? A Java abstract class is a class that can't be instantiated. That means you cannot create new instances of an abstract class. It works as a base for subclasses. So if any other class extends abstract class then it must provide implementation of abstract method of that class otherwise you can also make child class as abstract. Learn more about Abstract class : Abstract class in Java See problem Description in HackeRank : Java Abstract Class Problem Solution Explanation : In code editor, we already have Book class and Main method. We have to simply create new class MyBook that extends Book class. As setTitle method is abstract in Book class, we must have to implement in our MyBook class if we extends Book class. So create method setTitle in MyBook class and set the title variable. And our solution is done. import java.util.*; abstract class Book{ String title; abstract void setTitle(St...
Welcome To Programming Tutorial. Here i share about Java Programming stuff. I share Java stuff with simple examples.