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 b/w Object base and object oriented programming?
how to convert the data from HTML file to SAS dataset?
merge sort time complexity
6 Answers BFL, CDAC, IBM, Jawaharlal Nehru Technological University JNTU,
what is the certificates in biztalk?
How to swap values between two variables without using a third variable?
24 Answers HCL, TCS,
what do u mean by tagging
SYNFOSYS PLACEMENT PAPER 2010 Hi Friends I have attended the recent synfosys test 2010. Here r some questions which i remember. Section – I 1) There are 12 balls weigh similar but one is dissimilar (more/less). How to find the dissimilar ball with minimum no of weighs? 2) There r 7people carrying 7bags. Each bag contains 7cats. Each cat has 7small cats. How many total legs r there? 3) There are 12 balls weigh similar but one is dissimilar (more/less). How to find the dissimilar ball with minimum no of weighs? 4) 5) There r 2 poles each 15 meters high. A cable of length 16 meters is tied between pillars top. For its maximum the cable lies down above 7mts high from the ground. What is the distance between pillars? ------------------------------------------------------------ ------------------------------------------------ Section -II What is the value of 11^5 Some Other quetions ------------------------------------------------------------ ------------------------------------------------ Section - III 16) Serialization and deserialization? 17) Will finally block execute even though there is an exception & return statement are there in catch block? Explain? 18) memory leak? How can we avoid it? 19) virtual destructor? 20) Two program codes for code optimization? ------------------------------------------------------------ ------------------------------------------------ Section – IV Q) Program for finding the alternate digits of the number If number is 35846 then Sum1=3+8+6=17 Sum2=5+4=9 Q) Program for Single linked list? ------------------------------------------------------------ ------------------------------------------------ Section - V Q) What is software engineering? Explain SDLC Q) Explain any two upcoming IT Scenarios? ------------------------------------------------------------ ------------------------------------------------ Regards Gopinath Allanku +91 9885457211
What is a must for multitasking? a) Process preemption b) Paging c) Virtual memory d) None of the above
3. What is the difference between testing and Quality Assurance?
Definition of Singleton Class? what is the Purpose of it? what is the advantage?
1. Write a program to create a sentence at runtime and count number of vowels in it ? 2. Write a program to get a string and to convert the 1st letter of it to uppercase ?
How to connect the .accdb database file of microsoft access to the Visual Basic 6.0 forms?