Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is different betweet class and interface in java?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Need provab technical test questions

2846


Colors specified with the notation

2250


Q1.Write a C program which asks the user for a number between 1 to 9 and shows the  number. If the user inputs a number out of the specified range, the program should  show an error and prompt the user for a valid input.

2726


Which method protects back button to retrieve old value from previous page in Struts.

1863


we create a pf with 3 fields.2 is defined as keyfields.we lock it with alcobj command.how we find out whether the file is locked or not?is it dspfd??/

2034


what is the use of occurs 10 or (any number) in the internal table declaration with header line.

1926


when will triggars the at new event in abap and web dybn pro?

1972


why we use abstract in awt?

2023


shall we execute our java programmes in jre

2278


write a query that returns one row for each department and the number of employees in that department. Given two tables EMPLOYEE and DEPARTMENT, where there can be multiple employees per department.

1595


Is anyone has done the ASP.NET MVC4 workshop course(2 days) from Peers Technologies. Let me know. I need to talk before joining ASP.NET MVC4 training at peers, Hyderabad.

1988


Is buffer size and file block size is similar? If similar,at which case it will be same size?

2180


Can we write a method in JSP.If so how?

2031


1. Consider the following input and generate the object code using single pass assembler. JOHN START 0 USING *,15 L 1,FIVE A 1,FOUR ST 1,TEMP FOUR DC F’4’ FIVE DC F’5’ TEMP DS ‘F END

2830


When we have two versions of the dot net installed how does the compiler know which version of DLL it has to select to an application.

1921