java - How can I access the variables of an inner class? -


class outer{   int c,    void values() {     inner.a=3;     inner.b=4;   }    void addvalues() {       **inner.a += c;** // **how can access value of a=3 values() method?**   }    class inner{       int a,b;   } } 

1) need instance of inner that

or

2) can declare inner static , make variable a static


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -