File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

Inner Class concept

 
harsh sahay
Greenhorn
Posts: 13
Eclipse IDE Java Mac
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
hi...I tried to create a simple MyOuter class which holds an inner class called MyInner. As expected, two .class files where created after compilation as shown below:-
public class MyOuter
{
class MyInner
{
MyInner()
{
}
}
}

class MyOuter$MyInner
{
MyOuter$MyInner(MyOuter paramMyOuter)
{
}
}

Can Someone please explain me as to why no constructor was created for MyOuter class as the compiler is supposed to insert it by default.
Secondly, what is the meaning of MyOuter paramMyOuter argument in MyOuter$MyInner constructor and how it helps.Please explain me the complete flow.
Thanks>>
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Welcome to the Ranch!

Please don't post the same question in multiple forums. I'll close this one, let's continue in your other post.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic