Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Core Java Interview Questions and Answers

Question: How to define an Interface in Java ?
Answer: In Java Interface defines the methods but does not implement them. Interface can include constants. A class that implements the interfaces is bound to implement all the methods defined in Interface.
Emaple of Interface:
public interface sampleInterface {
	public void functionOne();
	public long CONSTANT_ONE = 1000; 
}
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook