I need some more information about interface. For Example there is no any functionality inside the method which is declared in any interface. Then why i want to implement that interface to my class. 2. Statement is an interface. When i say stmt.executeQuery(). I am getting the records in my ResultSet. How it is possible?.. since there is no functionality insid the methods which is declared in Statement Interface. What is happning here?

An idea

Questions by antony_praveen80   answers by antony_praveen80

Showing Answers 1 - 6 of 6 Answers

Padmaja

  • Sep 29th, 2005
 

The JDBC driver vendor provides the implementation of the API. Please go thru the purpose of JDBC Drivers.

  Was this answer useful?  Yes

sarat

  • Sep 29th, 2005
 

hi

that iner face have the reference which is getting from its implementing class

ex:

interface a;

class b implements a;

then a a1=new b();

a1.method();

like above interfaces also used for methods even though they dont have body

the above mean thare is the methods declared by a is implemented in b class

sangeeta

  • Oct 3rd, 2005
 

The interface is implemented privately in rt.jar which you put in ur lib directory and set it in your classpath.

  Was this answer useful?  Yes

mohana

  • Nov 16th, 2005
 

hi this is mohana interface is alternate for multipleinheritence,java does not support multiple inheritence so interface is replace that one ,and also apply polymorphism by using interface.thanq bye cheers.... anotherone is i d't know sorry

  Was this answer useful?  Yes

sasi

  • Jul 20th, 2006
 

hi.....

for example..take SUN as example..they provides..only  interfaces..that means..they give only NULL implementations..

i.e.what is the returntype of the interface..

what is the method & its arguments

like that.....so according to that we provide a boby to the interface later..with better accuracy..following some..standrds.

so it is better for third party vendory..who provides a body in better way......thats the reason interfaces are having much important im java

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions