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

How are delegates chosen?

468


What is the difference between a class and an object c#?

481


Explain what is an interface in c#?

526


What is delegate in c# interview questions?

503


What is desktop example?

493






What is difference between first and firstordefault?

501


What is the use of command builder?

547


Explain the types of comments in c#?

554


What is a Assembly?

550


What is indexer c#?

471


Explain About a class access specifiers and method access specifiers.

554


What are the steps for creating clr trigger

573


What is the difference between returning iqueryable vs ienumerable?

460


How does dependency injection work c#?

504


What is difference between ienumerable and ienumerator in c#?

528