Can we create instance for Abstract class?
Answer Posted / manjit
abstract class aa {
public abstract void main(String[] args);
}
class aaa {
public static void main(String[] args)throws Exception{
Object x = Class.forName("aaa").newInstance();
System.out.println(x);
}
}
Try the above program and be amazed and shocked!
Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
What is the difference between namespace and class in c#?
Can we override constructor in c#?
How garbage collection deals with circular references.
How many types of serialization are there in c#?
Is null empty or whitespace c#?
What is foreach loop in c#?
What is data quality assurance?
Explain how do I convert a string to an int in c#?
What is the use of partial methods?
What is entity framework c#?
Is string null or empty?
How does yield return work c#?
Why do we use dataset in c#?
How does one compare strings in c#?
Define strong name in c#?