why do we use interface in java?

Answer Posted / sandeep sagala

Interface is used to get an 100% abstract class. By using
this class we cant create an object for this class. In this
there will be all the unimplemented methods only. No method
is implemented in this type of classes. The methods present
inside this interfaces are all static and public by default.
The attributes present inside this interfaces are public,
final and static by default.

Is This Answer Correct ?    4 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a protected class in java?

548


What is the difference between abstraction and encapsulation?

568


23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an tag?. code,height & width. 26. What does 'CODEBASE' in an applet tag specify?. Files absolute path.

2063


What are keywords in programming?

572


Can we create constructor in abstract class ?

592






What is meant by nested loop?

546


What is a values collection view ?

689


How to sort an unsorted array in java?

621


What is the size of arraylist in java?

616


Explain about strings in java?

628


How does system arraycopy work in java?

593


take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).

1537


What does += mean in java?

589


What is the difference between length and length () in java?

535


What is the meaning of nullable?

580