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


Please Help Members By Posting Answers For Below Questions

Is dictionary a collection?

619


What is binary search tree in data structure?

649


What is an abstract class c#?

662


What is static and use of it?

670


In which situation(s), the use of "Delegate" is a good idea?

741


Explain About multi level and multiple inheritance how to achieve in .net

771


What is the default value of boolean variable?

631


What is default boolean value in c#?

686


How does array sort work?

658


What are floating point numbers?

650


Can a struct inherit from an interface in c#?

720


Explain the difference between event and a delegate in c#?

713


What is the difference between static and private constructor in c#?

677


Which string method is used for concatenation of two strings in c#?

665


Is list immutable in c#?

662