• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using Method from other class as if it were in same .class file  RSS feed

 
Tye Solan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class file in a package thats imported fine but I need to type
MasterCode.Wait(int);
when I would like it if I could just type
Wait(int);

Is there away to do this?
 
Tom Reilly
Rancher
Posts: 618
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out static imports. Note that these only work in Java 5 and above.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

You can find some info about static import that Tom mentioned here: Static Import
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!