Declare a class as an atribute of another class in Java -


how define class attribute of class? can have multiple classes of classes, class an attribute of class users?

class community{   class users();   static string x;   static int y;   community(){} } class users{   static string name;   static int reputation; } 

in java there nested classes , mean can create class inside class , :

    class x{ class y{ } y newy=new y(); } 

and here newy object or member inside class x


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -