Forums Register Login

method local inner class doubt

+Pie Number of slices to send: Send


how is it possible to use that f() in localInner?
+Pie Number of slices to send: Send
 

Originally posted by adam Lui:
...how is it possible to use that f() in localInner?


localInner.f() does not work because f() is not static (and inner classes cannot have static declarations). So you would need to create an instance of localInner, and call the method using that instance.
[ November 14, 2007: Message edited by: marc weber ]
Their achilles heel is the noogie! Give them noogies tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 617 times.
Similar Threads
Inner class data access
problem about anonymous inner class
Question regarind Inner Classes
invoking inner class method
mock question
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:22:46.