There are two issues:
- you can't call non-static methods without having an instance of that class and
- you can't directly call static methods without mentioning the class name.
The first one is easy to solve: if your method doesn't actually use any non-static members (fields or methods) of the class, then simply adding the static keyword enables you to call it without an instance of the class:
// in YourClass:
public static void yourMethod() {
//stuff
}
// somewhere else:
YourClass.yourMethod();
And about the second item: I kind-of lied there, you can do that, but you need a static import:
// at the beginning of your .java file
import static yourpackage.YourClass.yourMethod;
// later on in that file:
yourMethod();
Also: there are no functions in Java, only methods.