Does anyone know how to access java classes from a different file? We have always used only one file for all code but now it's so big so I was wondering if there is any way (I'm sure there is some way but idk) to do that.
Like for "User Messages", we made a class "writeUM".
Quote:
public void writeUM(int line, String Message) {
if(line == 1) {
uM.println(DriverStationLCD.Line.kMain6, 1, Message);
uM.updateLCD();
}
else if(line == 2) {
uM.println(DriverStationLCD.Line.kUser2, 1, Message);
uM.updateLCD();
}
else if(line == 3) {
uM.println(DriverStationLCD.Line.kUser3, 1, Message);
uM.updateLCD();
}
else if(line == 4) {
uM.println(DriverStationLCD.Line.kUser4, 1, Message);
uM.updateLCD();
}
else if(line == 5) {
uM.println(DriverStationLCD.Line.kUser5, 1, Message);
uM.updateLCD();
}
else if(line == 6) {
uM.println(DriverStationLCD.Line.kUser6, 1, Message);
uM.updateLCD();
}
}
|
So this is at the end of our program. I was wondering if I can put this in a different file and call that file instead.
Thanks.
.