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

What is the difference between namespace and class in c#?

508


Can we override constructor in c#?

506


How garbage collection deals with circular references.

471


How many types of serialization are there in c#?

461


Is null empty or whitespace c#?

505






What is foreach loop in c#?

533


What is data quality assurance?

446


Explain how do I convert a string to an int in c#?

520


What is the use of partial methods?

578


What is entity framework c#?

464


Is string null or empty?

515


How does yield return work c#?

510


Why do we use dataset in c#?

491


How does one compare strings in c#?

545


Define strong name in c#?

523