wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Doubt in inner class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Doubt in inner class" Watch "Doubt in inner class" New topic
Author

Doubt in inner class

Debashree Halder
Ranch Hand

Joined: Jul 27, 2005
Posts: 81


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...


Debashree Halder<br />SCJP 1.5<br />Washington DC
M Srilatha
Ranch Hand

Joined: Aug 27, 2008
Posts: 137


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 ]

Thanks,<br />Srilatha M
Debashree Halder
Ranch Hand

Joined: Jul 27, 2005
Posts: 81
oops! got it...thanks.
it was indeed a typo
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt in inner class
 
Similar Threads
Inner class
Inner Class reference
inner class reference
Inner Class question..
inner class instantiation from outside the the outer class