Forums Register Login

Inner Class cannot have static method ?

+Pie Number of slices to send: Send
Hi, Please advice why inner class cannot have static method.
+Pie Number of slices to send: Send
What would be the point?

Inner classes exist only to perform some sort of helper function for the enclosing class. If you're going to give them static methods, you might as well give the static methods directly to the enclosing class.
1
+Pie Number of slices to send: Send
I had done a small program regarding the inheritance and the static field declaration in inner classes
hope this is little useful to you
+Pie Number of slices to send: Send
Thanks Stephan & Prasad
money grubbing section goes here:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 6471 times.
Similar Threads
Nested/Inner classes Example program
more about nested class topics
accessing shadowed final values in method local inner class
Inner Class Doubt
doubt in InnerClass
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:43:20.