Answers for "reference in programming"

0

reference in programming

               var student : Student = new Student("Jim");   // the "student" variable contains a reference to "Jim"               var other   : Student = student;              // the "other" variable also contains a reference to "Jim"                 student.name = "James"; // rename the student                trace("The students name is: " + student.name ); // prints James                trace("The other name is: " + student.name ); // prints James as well                other.name = "Joe";                trace("The students name is: " + student.name ); // Prints Joe!         
Posted by: Guest on November-11-2020

Browse Popular Code Answers by Language