Calling Methods without classes

Hi,

Here is my situation:

Class A has a static printMe(text); method in it. Just displays to stdout.

Class B has methods X,Y,Z.

I would like to use printMe within Class B without doing this:

ClassA.printMe("Test");

I can do this obviously if I subclass, but that is not an option. I know in JUnit 4, you just need to put an @Test before a method and then you can easily call your assert methods. So I am looking for something of that nature. Any information would be great! Links, posts, etc.

Thank you,

[552 byte] By [dayrinnia] at [2007-11-27 7:45:24]
# 1
> I would like to use printMe within Class B without doing this:> ClassA.printMe("Test");static import? http://java.sun.com/j2se/1.5.0/docs/guide/language/static-import.html
Hippolytea at 2007-7-12 19:26:06 > top of Java-index,Java Essentials,Java Programming...
# 2
Thank you very much.That is exactly what I wanted. I'm building a small debug framework for large projects and I didn't want to have to keep typing the class name in front of the debug method(s).
dayrinnia at 2007-7-12 19:26:06 > top of Java-index,Java Essentials,Java Programming...
# 3
You're welcome, but be sure to read the paragraph on the linked page that begins:So when should you use static import? Very sparingly! ...
Hippolytea at 2007-7-12 19:26:06 > top of Java-index,Java Essentials,Java Programming...