what is different betweet class and interface in java?
Answers were Sorted based on User's Feedback
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 |
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 |
What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
SAS using companies in INDIA
29 Answers Bank Of America, Cap Gemini, Hyundai, IBM, KO, Sristek, TCS, Wipro, WNS,
Given a set. Write the pseudo code to get all the subsets for the given set. Eg. Input : {1,2} Output : (),(1),(2),(1,2)
Write a shell program. Enter number of days from keyboard. Find out the number of years, month and days it contains
I want to insert date in the form of yyyy-mm-dd... if any changes happen while inserting date format want to show error meg...any one can solve this..??
Suppose server object is not loaded into the memory, and the client request for it , what will happen?
How to find the aerry size
Which of the following are Java modifiers?
How should a programmer decide whether to use a macro or a subroutine to accomplish a given logical function
1 Answers R V College of Engineering, University of Jordan,
A, B and C are 8 bit nos. They are as follows: A 1 1 0 1 1 0 1 1 B 0 1 1 1 1 0 1 0 C 0 1 1 0 1 1 0 1 Find ( (A-B) u C )=? how to solve this need with steps
Write a Pseudo Code to find the angle between two hands of a clock for a given time.
How will you prove that java swing is multithreaded?