File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes abstract class or interface Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Performance
Reply Bookmark "abstract class or interface" Watch "abstract class or interface" New topic
Author

abstract class or interface

rohit rusty
Greenhorn

Joined: Jun 27, 2011
Posts: 14
in one case if we are using absttract class and in the other if we are using interface. which one shoul take lesser time given both the programs are performing the similar operation?
- regards
Rohit
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 11862
In spite of the fact that it makes no difference, you should not be worrying about performance when making this decision - instead, worry about clarity and maintainability.

"Premature optimization is the root of all evil"

Bill

Java Resources at www.wbrogden.com
samir vasani
Ranch Hand

Joined: Nov 24, 2010
Posts: 50
Performance wise interface is slower then abstract class...
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 11862
Performance wise interface is slower then abstract class...


Really I would really love to see documentation that backs up this utterly astonishing statement.

Or, if no documentation is available, where you got the idea.

Bill
 
IntelliJ Java IDE
 
subject: abstract class or interface
 
Threads others viewed
Anonymous Inner class extends/implements
which is better:Runnable interface or Thread class
CAn someone please explain this statement.
Interface methods
Difference between Abstract Class and Interface, Which scenarios we are using both?
MyEclipse, The Clear Choice