• + 0 comments

    public class Solution {

    public static void main(String[] args) {
        /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
        Scanner scan = new Scanner(System.in);
        MyBook myBook = new MyBook();
        String title = scan.nextLine();
        myBook.setTitle(title);
        System.out.println("The title is: "+myBook.getTitle());
    }
    

    }

    abstract class Book{ String title; abstract void setTitle(String s); String getTitle(){ return title; } }

    class MyBook extends Book{ @Override void setTitle(String s){ super.title = s; } }