I am having trouble with a relatively simple problem: I am trying to use a method from another class to add to an integer in my main class but the value of my integer is not increasing, the value stays the same, this is what the code looks like:
public class prog{
/**
* @param args
* @throws MidiUnavailableException
*/
public static void main(String[] args) {
int num = 11;
thing.add(num);
System.out.println(num);
}
}
and the class 'thing' being:
public class chords2 {
static void add(int val){
val = val+9;
}
}
any tips on how to get this to work is most appreciated