• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Interfaces and Nested Classes

 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following code is valid !!!


 
Ranch Hand
Posts: 45
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, this code is valid. Because java lets you define classes and interface inside another interface.

There is a already existing post on this. Hopefully this will help.

https://coderanch.com/t/456598/Programmer-Certification-SCJP/certification/classes-inside-interfaces

Regards
Balraj
 
Ranch Hand
Posts: 196
Android Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Balraj Momi wrote:Yes, this code is valid. Because java lets you define classes and interface inside another interface.

There is a already existing post on this. Hopefully this will help.

https://coderanch.com/t/456598/Programmer-Certification-SCJP/certification/classes-inside-interfaces

Regards
Balraj




classes inside interfaces are implicitly public and static.....
this also doesn't mean that they can't be abstract.....

see the above link for details.....

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic