Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (7k points)
I am new to Java and can somebody tell me what an interface in Java is?

1 Answer

0 votes
by (13.1k points)

An interface is a special type of abstract method which does not implement any methods.

It is used to achieve abstraction in java. There can be only abstract methods in the interface.

Its syntax is:

interface Interfacename{

void abstractmethod();

}

Want to learn Java? Check out the Java course from Intellipaat.

Related questions

0 votes
1 answer
asked Feb 20, 2021 in Java by Jake (7k points)
0 votes
1 answer
asked Feb 18, 2021 in Java by Jake (7k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...