Abhi Java 1.2
Abhi Java 1.2
Aim of the practical: You have to create another class that extends the abstract class. Your task
is to write just the MyBook class.
Objective: In this challenge, we're going to use abstract class to create subclass of MyBook.
Program Code:
import java.util.*;
abstract class Book{
String title;
abstract void setTitle(String s);
String getTitle(){
return title;
}
}
}
}
Output:
3. I have learnt how to make subclass with the help of abstract class.
Evaluation Grid :