Geeks Talk

Prepare for your Next Interview




which one more powerful in java ?

This is a discussion on which one more powerful in java ? within the Java forums, part of the Software Development category; Which concept (Interface or Inheritance) is more powerful in java? ------------- suresh...


Go Back   Geeks Talk > Software Development > Java

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 12-22-2006
Contributing Member
 
Join Date: Sep 2006
Location: bangalore, india
Posts: 1,007
Thanks: 0
Thanked 76 Times in 64 Posts
psuresh1982 will become famous soon enough
which one more powerful in java ?

Which concept (Interface or Inheritance) is more powerful in java?

-------------
suresh
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-05-2007
Expert Member
 
Join Date: Oct 2005
Location: india,cochi,bangalore
Posts: 395
Thanks: 2
Thanked 8 Times in 7 Posts
vmshenoy is on a distinguished road
Re: which one more powerful in java ?

hi
I think both are equally imp in java!Still i think may be inheritance simply coz it allows code reusability.interfaces used for multiple inheriance only,so i think
inheritance is powerful.
bye
__________________
:)
NEVER SAY DIE.
Reply With Quote
  #3 (permalink)  
Old 03-31-2007
Junior Member
 
Join Date: Mar 2007
Location: India
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
rkdash2002 is on a distinguished road
Re: which one more powerful in java ?

Interface no doubt!
Reply With Quote
  #4 (permalink)  
Old 04-01-2007
Junior Member
 
Join Date: Mar 2007
Location: hyderabad
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
paluri is on a distinguished road
Re: which one more powerful in java ?

'both are imporatant no doubt abt it...i am going to explain it clearly tomorrow..becaoz...there is need to refer abt it clearly'
Reply With Quote
  #5 (permalink)  
Old 04-02-2007
Junior Member
 
Join Date: Mar 2007
Location: Bangalore
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Gnanadurai.P is on a distinguished road
Re: which one more powerful in java ?

Both the concepts are having its own important,But compare to Inheritance Interface having more powerful....
Reply With Quote
  #6 (permalink)  
Old 04-02-2007
Junior Member
 
Join Date: Feb 2007
Location: Conway, AR, USA
Posts: 23
Thanks: 0
Thanked 4 Times in 3 Posts
rachilc is on a distinguished road
Re: which one more powerful in java ?

Inheritence is a time tested, 'globally' accepted feature. So inheritence is a very, very powerfule feature.

Interfaces are powerful only because inheritence is powerful.

Interfaces combine two very important notions in programming.

Inheritence + abstraction = interface

The abstractness part allows us to 'program to interfaces' and is used in atleast a couple of design patterns (I know only two p[atterns ). This provides a common interface making the code extensible and maintanable at the same time.

And you know what inheritence brings to the package.

I still can't decide which is more powerful
Reply With Quote
  #7 (permalink)  
Old 04-02-2007
Junior Member
 
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
hpuse is on a distinguished road
Re: which one more powerful in java ?

Inheritance -->enforces reusability in the design phase (closed to traffic at runtime JRE ).

Interface --> enforces and defines an open standard for any future framework to be build upon. (open to traffic at runtime JRE )
Reply With Quote
  #8 (permalink)  
Old 04-03-2007
Junior Member
 
Join Date: Sep 2006
Location: trivandrum
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
aiswaryarajendran is on a distinguished road
Re: which one more powerful in java ?

Both are equally important in java..
Reply With Quote
  #9 (permalink)  
Old 04-03-2007
Contributing Member
 
Join Date: Feb 2007
Location: bangalore
Posts: 52
Thanks: 1
Thanked 11 Times in 9 Posts
neelim is on a distinguished road
Re: which one more powerful in java ?

As the famous GoF book says:

Prefer interfaces over inheritance.

Use interfaces as a design-time resource when you are planning your system. Inheritance should be used almos always to reuse code. If your system is designed based on interfaces, it will be easier to maintain and to evolve. Of course this is not a fixed rule, but it works most of the time.

--------------
Neelima
Reply With Quote
  #10 (permalink)  
Old 12-18-2007
Contributing Member
 
Join Date: Nov 2007
Location: bangalore
Posts: 54
Thanks: 6
Thanked 3 Times in 3 Posts
rahulvegi is on a distinguished road
Re: which one more powerful in java ?

encapsulation,polymophism and interfaces.
another main concepts:
reusability.
portability.
Reply With Quote
  #11 (permalink)  
Old 1 Week Ago
Junior Member
 
Join Date: Nov 2008
Location: banglore
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
hemanthreddy42 is on a distinguished road
Re: which one more powerful in java ?

can we read a xml file through the core java application?if possible provide one example also?
Reply With Quote
  #12 (permalink)  
Old 1 Week Ago
Junior Member
 
Join Date: Nov 2008
Location: India
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
niitcho is on a distinguished road
Re: which one more powerful in java ?

Quote:
Originally Posted by psuresh1982 View Post
Which concept (Interface or Inheritance) is more powerful in java?

-------------
suresh
Interface. Because Multiple inheritance are not allowed in jave
Reply With Quote
  #13 (permalink)  
Old 1 Week Ago
Junior Member
 
Join Date: Nov 2007
Location: India
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
navneett is on a distinguished road
Re: which one more powerful in java ?

Inheritance is the major force behind any object oriented language.

First inheritance concept comes in picture then any other thing(like interface) which need to be inherited.

So powerful in Inheritence offcourse!!!
Reply With Quote
The Following User Says Thank You to navneett For This Useful Post:
Reply

  Geeks Talk > Software Development > Java


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
What are the advantages of .net over Java? JobHelper VB.NET 9 3 Weeks Ago 01:40 AM
Sockets in Java janelyn Java 3 07-26-2008 10:07 AM
multiple inheritance in java... psuresh1982 Java 20 07-23-2007 02:33 PM
Which is Powerful janelyn C and C++ 1 08-31-2006 04:37 PM
java compatibility with php rohit_iips PHP 0 07-30-2006 01:59 AM


All times are GMT -4. The time now is 05:26 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved