• Post Reply Bookmark Topic Watch Topic
  • New Topic

Nested Classes  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I am using nested classes, how to access the inner class methods and variables. For example


class A
{
int x,y;
class B
{
int x,y;
public f()
{}
}
}

How to access the inner class instance variables. What if I define inner class as static? Can anybody explain where exactly we go for nesting of classes and about the access details of inner and outer classes variables and methods?
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can read about inner classes here.

Steve
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent Steve
 
Ravi Hyd
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve, the explanation on Inner class is excellent. I got answers for all my questions.

Kudos to you.

 
You'll never get away with this you overconfident blob! The most you will ever get is this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!