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
Need provab technical test questions
Colors specified with the notation
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.
Which method protects back button to retrieve old value from previous page in Struts.
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??/
what is the use of occurs 10 or (any number) in the internal table declaration with header line.
when will triggars the at new event in abap and web dybn pro?
why we use abstract in awt?
shall we execute our java programmes in jre
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.
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.
Is buffer size and file block size is similar? If similar,at which case it will be same size?
Can we write a method in JSP.If so how?
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
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.