File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Abstract class and new() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Abstract class and new()" Watch "Abstract class and new()" New topic
Author

Abstract class and new()

Nitin Bhagwat
Ranch Hand

Joined: Sep 09, 2004
Posts: 132
Why Java allows us to break rule of no new operator can be used for abstract class?



"Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
Joe Borderi
Ranch Hand

Joined: Oct 23, 2004
Posts: 151
"Why Java allows us to break rule of no new operator can be used for abstract class?"

It doesn't. In this case, you are creating an anonymous class that extends Tester.
Muralidhar Mandapati
Greenhorn

Joined: Nov 14, 2004
Posts: 23
In the above example that you have provided it is considered to be a anonymous inner class and infact the code


can be viewed as a class that extends the Tester class and which implements run method.
Nitin Bhagwat
Ranch Hand

Joined: Sep 09, 2004
Posts: 132
Thank you Borderi , Muralidhar
sanjeevmehra mehra
Ranch Hand

Joined: Aug 21, 2004
Posts: 75
can be viewed as a class that extends the Tester class

I am not able to get this point, can you provide me more detail or source of information.


thanks & regards,<br />Sanjeev.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Abstract class and new()