Jump to content
  • Advertisement
Sign in to follow this  
tom_mai78101

[Java] Anomyous Inner Type - An interface returning such type...

This topic is 2612 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

While I was programming something for Android, I came upon this:

[attachment=5820:Untitled.png]

What is an anomyous inner type from an interface? Googling only returns Nested Inner Class examples, which didn't explain how interfaces can return anomyous inner types. Ironically, this is even outside of my Java textbook's scope, so I'm not sure...

Anyone who can explain this, please post here. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
You can have nested Interfaces, the same as nested classes.

The Interface isn't returning an anonymous type, it is the "anonymous" type.


Although I think your IDE has incorrectly labeled it anonymous ?? Becuase of the dot notation used in Android. The standard JVM uses $.

Share this post


Link to post
Share on other sites

You can have nested Interfaces, the same as nested classes.

The Interface isn't returning an anonymous type, it is the "anonymous" type.


Although I think your IDE has incorrectly labeled it anonymous ?? Becuase of the dot notation used in Android. The standard JVM uses $.


Well, I don't know how to fix it. It might be included in the ADT Plugin, but who knows? Thanks for the tip!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!