I do an import of the full package name / java file, and if I do a <classname>.<method>
, SOMETIMES I can get it to access - other times I get a lot of can't use a static in a non static
bunch of talk.
I'll admit I'm new to Java, so what do I need to do? Call a class instance first, then call my methods? I'm rather confused by this, as I want to put all of my 'functions' into a FunctionsList.java file, and all of my main Activity (UI) into a MyActivity.java file.
For example:
<MyActivity.java>
import com.example.FunctionsList;
private class MyActivity extends Activity {
FunctionsList.function();
}
9/10 times I get that static/non-static error.
If I put all of my functions into MyActivity.java, I have zero problems! Anyone help me on what I presume is a basic Java newbie issue?