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

help using static methods  RSS feed

 
Haakon Lind
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I`m currently looking into static methods. And I`ve gotten stuck pretty quick on the subject :

The compilation of Bestilling goes fine, but it won`t compile Feeder. It says it doesn`t recognize the method hentFlighten() . What am I missing here?
Thanks!
Haakon
[ January 27, 2004: Message edited by: Haakon Lind ]
 
Ray Stojonic
Ranch Hand
Posts: 326
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If these are both in the same file, as it would appear, they both can't be public. But that would give a different error...
Are they in different packages?
Please include more source code
 
Haakon Lind
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, these are two different classes in the same mounted directory (using Netbeans).
This is the whole source code, they are only tests that don`t do anything, just want to get to know the world of static.
This is the specific error when compiling Feeder.

Please let me know if it looks ok, maybe I should take the time to set up for manual compilation.
 
Billybob Marshall
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the compiler is probably seeing a different version of the Bestilling class in the classpath, and that version is not the one you are showing the source code for.
 
Haakon Lind
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, thanks man! I unmounted all the other dirs and now it compiled, finally I can delve into the messy stuff
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!