Was looking through the forums, but I couldn't find a precise answer. Hope someone can help me out. I'm fairly new at programming.
I have the following list of strings in a class. (in Schedule.java):
String[][] schedule = {
{"English", "Music", "Math", "French", "Physics", "Chemistry"},
{"Contemp.", "Math", "French", "Chemistry", "Phys Ed", "English"}
};
How would I be able to 'access' these strings from another class? (ActivityMain.java)
For example, in ActivityMain.java , I want to pull: schedule[0][1]
which would be "Music" and then set that in a TextView
in ActivityMain.java.
How would I be able to get the string "Music" from Schedule.java to MainActivity.java ?