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

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

nginx - phpPgAdmin - log in works but I have to login again after clicking on any links -