Interfaces

  • Eclipse: Oxygen
  • Java: 1.8

This tutorial deals with interfaces. The interfaces are somewhat similar to a class but have very interesting properties. Interfaces serve as an outline of the class ‘implementing it'(inherit). The members declared in it are public, static by default.

Hence we can have a constructor for an abstract class (which will be discussed further) but not for the interface as it contains static members.

If any method (abstract by default) is not declared in the class implementing it then the class has to declared as abstract.

Output

Processor: SD835
Space in GB: 64

Output

Processor: SD835
Space in GB: 64

Output

Processor: SD835
Space in GB: 64

Output

Processor: SD835
Space in GB: 64

Contributed by: Poonam Tomar


Full stack Java Developer

   Buy me a coffee!

 

PayTM QR (INDIA)

Download file

Leave a Reply

avatar
  Subscribe  
Notify of
Close Menu