0
If we run an unextended abstract class will it throw an error?
public abstract class Customer { private string name; public Customer (String name){ this.name = name; } public String getName(){ return name; } public abstract void buy(); }
4 Respuestas
+ 2
if the given code does not give error by compiler..
related to abstract class.
jvm only run psvm()
only
so give code is compile and execute
without doing anything..
.
+ 1
this is a challenge question so what's main problem...
+ 1
You can't create instance of abstract class, so as long as there's no "new Customer()" it should work.
0
yes it was a challenge question .
I think we can not run an abstract class. While the code compiles fine.
Am I right?