class Vehicle{
    public void park(){
        //Do something
    }
}
class Example{
    public static void main(String args[]){
    Vehicle v1=new Vehicle();
    Vehicle v2=new Vehicle(){
        public void park(){
            //Do something
        }
        public void start(){
            //Do something
        }
        //start();
    }/*.start()*/;
    //v2.start();
    }
}

//All of those calling for start functions are illegal. Is there a possible way to access start function?

0

There are 0 best solutions below