Engineering Full Stack Apps with Java and JavaScript
Notes: https://javajee.com/book/java-core-object-oriented-programming
Create class Abc in a package with a protected variable. Create another class Def in another package extending the class Abc and print the value of inherited protected variable.
Without answers: set-21
Create an interface InterA with a single method. Create a class that implement that interface.
Create an Abstract class with one abstract and one concrete method. Create a concrete child class that extend the abstract class.
Without answers: set-24
Write a program to demonstrate casting. Create class Abc. Create class Def that extend from Abc. Create a method m1() that print "I am m1 in Def" only in Def. Create an object of Def and assign it to a reference of Abc. Use casting to invoke the method m1() using the reference of type Abc using casting.
With answers: set-26
Without answers: set-27