• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

interfaces and abstract classes

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
in real time applications we are using interfaces which are having method definitions without body.so interfaces methods dont have behaviour so these methods are implemented in sub classes...my question why can't we use methods with body directly in class instead of declaring methods in interfaces...so pleases tell us where exactly interfaces are help ful for realtime applications...and also tell us in which scenario we go for abstract class instewad of interfaces..wating for ur response...

venu
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
In interface or abstract class, we are going to have common methods which is used for application in many classes...At the same time if ur class wants to extend more than one class ,u can use interface for the common methods..i think it may clear ur doubts ...
if not see the below link
http://www.javaworld.com/javaworld/javaqa/2001-04/03-qa-0420-abstract.html
thanks
Ramesh.N
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

U can grab some crisp explantions again in the following URL:


http://mindprod.com/jgloss/interfacevsabstract.html

Sathya
 
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are asking about a basic object-oriented approach. Are you saying that the fact that you are working in a real-time context is an issue?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic