aspose file tools
The moose likes Beginning Java and the fly likes Cannot invoke my set method Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Cannot invoke my set method" Watch "Cannot invoke my set method" New topic
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
    
    1

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
    
    4
That isn't a "set" method at all.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2896
    
    1

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
    
    6


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%|
 
I agree. Here's the link: http://jrebel.com/download
 
subject: Cannot invoke my set method
 
Similar Threads
Displaying a please wait message while processing
How many string object created in this code
Can we override static method
passed 81%
static generic class