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
Is dictionary a collection?
What is binary search tree in data structure?
What is an abstract class c#?
What is static and use of it?
In which situation(s), the use of "Delegate" is a good idea?
Explain About multi level and multiple inheritance how to achieve in .net
What is the default value of boolean variable?
What is default boolean value in c#?
How does array sort work?
What are floating point numbers?
Can a struct inherit from an interface in c#?
Explain the difference between event and a delegate in c#?
What is the difference between static and private constructor in c#?
Which string method is used for concatenation of two strings in c#?
Is list immutable in c#?