How do you relate a Interface to a Class? Tell me in
Detail?
Answer Posted / s.thirunavukarasu
with the help of implementing interface,we can relate a
interface to a class.
for example
interface firstone
{
public void display();
}
class myprm implements firstone
{
public void disply()
{
system.out.println("welcome to java world");
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What does it mean that a method or field is “static”?
How many types of exception can occur in a java program?
Can a string be null?
What is fundamental datatype?
Is it possible to compare various strings with the help of == operator?
Why java is made?
Is a char always 1 byte?
Why do we need singleton?
Highest level event class of the event-delegation model?
What is the purpose of the wait(), notify(), and notifyall() methods in java programming?
Describe what happens when an object is created in java ?
Why do we need variables?
What are thread priorities and importance of thread priorities in java?
Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?
What is the meaning of find and replace?