Forums Register Login

static members in inner classes

+Pie Number of slices to send: Send
Why static members are not allowed inside inner class?
+Pie Number of slices to send: Send
An inner class is a nested class that is not explicitly or implicitly declared static. Inner classes may not declare static initializers or member interfaces. Inner classes may not declare static members, unless they are compile-time constant fields.
+Pie Number of slices to send: Send
because the inner class is member variable same as member and class variables.Can you declare static variables in method?
Maybe he went home and went to bed. And took this tiny ad with him:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 819 times.
Similar Threads
Question about static class
Non-static Inner Class
static variable in non-static inner class
inner anonymous class fields initialization
inner class
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:08:36.