You need to call it on some object.
For example:
class A
{
public void doStuff()
{
System.out.println("A!");
}
public static void main(String[] args)
{
doStuff(); //<Bad!
/* Good! */
A a = new A();
a.doStuff();
}
}
When you call a non-static method, you are saying you are calling a method on an object. The object is an instance of the class in which the method is defined. It is a non-static method, because the instance holds data in it's instance variables that is needed to perform the method. Therefore to call this kind of method, you need to get (or create an instance of the class. Assuming the two methods are in the same class, you could do
public class Foo
{
public static void main(String[] args)
{
Foo f = new Foo();
f.callNonStaticMethod();
}
}
for instance.