Forums Register Login

Doubt in inner class

+Pie Number of slices to send: Send


If I attempt to run this code it says
"Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method doStuff() in the type MyOuter.MyInner2 is not applicable for the arguments (String)

at practiceSCJP.InnerExamples.main(InnerExamples.java:30)"

Please explain...
+Pie Number of slices to send: Send


Hi,

Is that a typo? Change the mi2.doStuff("pop") to mi2.dostuff("pop")
It compiles and runs properly!

Hope this helps!
[ November 17, 2008: Message edited by: M Srilatha ]
+Pie Number of slices to send: Send
oops! got it...thanks.
it was indeed a typo
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 676 times.
Similar Threads
inner class instantiation from outside the the outer class
Inner class
Inner Class reference
inner class reference
Inner Class question..
More...

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