Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using unknown method  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I create class and method for it


Now when I try to use method I get


I try to use class


What's wrong?
 
Java Cowboy
Sheriff
Posts: 16082
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does your complete code look like? Because the two lines you show will not cause those (compiler?) errors by themselves.
 
Marshal
Posts: 58336
178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your myMethod variable might have gone out of scope.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!