what is different betweet class and interface in java?

Answers were Sorted based on User's Feedback



what is different betweet class and interface in java?..

Answer / gyana

In java by using class we cannot use concept of multiple
inheritance.but by using interface we can apply multiple
inheritance.

Class is a userdefined type declaration.Interface is a set
of rules that all d classes and interface who use it should
be obey the rule.

Normal class:-


class abc
{
public void a()
{}
}

interface declaration

Interface Iabc
{
public void ok()
{

}
}

class using interface

class abc:Iabc
{
public void ok()
{
string a="ABC";
return a;
}
}

Is This Answer Correct ?    6 Yes 0 No

what is different betweet class and interface in java?..

Answer / wipro company

do not return value of funtion in interface but return
value of funtion in the class

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

what is log files in qtp what is use

0 Answers   HSBC,


can we extend a class having only one parameterised constructor.Suggest the process to do it.

0 Answers   Zensar,


I'm new to ABAP. What is Module pool in SAP?

0 Answers   TCS,


how to convert infix expression to prefix expression?

0 Answers   nvidia,


what is adodb??y it is used for connection of V.B and access??what is ado?dao?

0 Answers   TCS,






What is algorithm in SCD Type2(SAS DI Studio Transformaton)?

2 Answers  


it is a language or tools?

0 Answers  


What is a PID? How is it useful when troubleshooting a system?

3 Answers  


What r the attributes using in Win Runner?

0 Answers   Tavant Technologies,


Hai, My name is nisha.I have NIC exam.If anybody Knows NIC previous paper pattern pls send me to nishanairp@gmail.com

0 Answers  


hi, i'd like to know how do you set lines in a page for Smartforms? thanks in advance

1 Answers   SAP Labs,


how to write the fallowing code in java? 1 4 9 16 25 36 49 64 81 100

1 Answers  


Categories