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 is the difference between COM and CORBA?
Create a class TicTacToe that will enable you to write a complete program to play the game of Tic-Tac-Toe. The class contains as private data a 3- by-3 double array of integers. The constructor should initialize the empty board to all zeros. Allow two human players. Wherever the first player moves, place a 1 in the specified square; place a 2 wherever the second player moves. Each move must be to an empty square. After each move determine whether the game has been won and whether the game is a draw. If you feel ambitious, modify your program so that the computer makes the moves for one of the players automatically. Also, allow the player to specify whether he or she wants to go first or second. If you feel exceptionally ambitious, develop a program that will play three-dimensional Tic-Tac-Toe on a 4-by-4-by-4
what is meaning of MDM in sap?let me know that meaning
what is the current salary package in India for a lamp programmer
how will you code the subfile which is in editing mode (multiple case subfile)?
I am looking for selenium RC online Training in chennai. can any one tell me the best institute
Hello Experts, What is the difference between move and move corresponding exactly? please post me asap
how to add a new table with variables and thier values into a imported file uisng proc import?
what do you man by firmware
How do you initialize a static member of a class with return value of some function?
1. What coding languages are you comfortable with?
suppose we have ten members of a physical file but we want the output of last 5 members only.how to achieve that?