| Author |
Cannot invoke my set method
|
Peter Hammar
Ranch Hand
Joined: Mar 01, 2010
Posts: 34
|
|
setUtensilie( int) cannot invoke setUtensilie() in Kolli is the error I get.
Any one with a good answer, please?
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
Help yourself, please analyze your Kolli class for method setUtensilie().
Is this method takes any argument ? Is it private ?
|
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
|
 |
Peter Hammar
Ranch Hand
Joined: Mar 01, 2010
Posts: 34
|
|
Hi!
This is the method in the Kolli class:
Maybe it should take an int as an argument?
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32644
|
|
|
That isn't a "set" method at all.
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
Peter Hammar wrote:This is the method in the Kolli class:
Maybe it should take an int as an argument?
Peter, why don't you try out your doubt.
|
 |
fred rosenberger
lowercase baba
Bartender
Joined: Oct 02, 2003
Posts: 9944
|
|
Do you really want this method to do nothing but call itself?
|
Never ascribe to malice that which can be adequately explained by stupidity.
|
 |
Abimaran Kugathasan
Ranch Hand
Joined: Nov 04, 2009
Posts: 2066
|
|
Peter Hammar wrote:Hi!
This is the method in the Kolli class:
Maybe it should take an int as an argument?
In which class this method belongs to? And if that method, doesn't expect any arguments, then you can't give it. And check in that class, whether there are any other overloaded method, which takes int as argument? After all, in your method, you call itself, ultimately, there will be a StackOverFlowException.
|
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
|
 |
 |
|
|
subject: Cannot invoke my set method
|
|
|