why am i getting an error in the pass by reference example obj1.add200really is underlined
public class Test { private int number; Test(){ number = 1; } public static void main(String[] args) { Test obj1 = new Test(); System.out.println("the number is " + obj1.number); System.out.println("the number 1 plus 200 is " + obj1.add200(obj1.number)); System.out.println("while the number is still " + obj1.number); System.out.println("\n"); System.out.println("the number is " + obj1.number); System.out.println("the number 1 plus 200 is " + obj1.add200really(obj1.number)); System.out.println("while the number is still " + obj1.number); } int add200(int somenumber){ somenumber = somenumber + 200; return somenumber; } int add200really(Test myobj){ myobj.number = 999; return myobj.number; } }