Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot invoke my set method

 
Peter Hammar
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


setUtensilie( int) cannot invoke setUtensilie() in Kolli is the error I get.

Any one with a good answer, please?
 
Sagar Rohankar
Ranch Hand
Posts: 2905
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Help yourself, please analyze your Kolli class for method setUtensilie().
Is this method takes any argument ? Is it private ?
 
Peter Hammar
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

This is the method in the Kolli class:



Maybe it should take an int as an argument?

 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That isn't a "set" method at all.
 
Sagar Rohankar
Ranch Hand
Posts: 2905
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 12022
25
Chrome Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Do you really want this method to do nothing but call itself?
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic