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
Why array is faster than arraylist in c#?
What is parameter c#?
What is the difference between string and string in c#?
What are annotations in c#?
How do you access a constant field declared in a class?
Explain concurrency with aop?
How do I calculate relative time?
How to do and Apply Themes to Datagrid,Lable,Textbox,etc., in C#.NET 2005 Windows Application? (like who we will do themes in ASP.NET using .CSS and .SKIN files). Urgent!!
What is the difference between disposing of () and finalize() methods in c#?
What are the problem with .NET generics?
Is list passed by reference c#?
What is the main method?
How does a while loop work?
Why we use extension methods in c#?
Is system a class in c#?