Create your account

Already have an account? Login here

Note: By joining, you will receive periodic emails from Coursetro. You can unsubscribe from these emails.

Create account

59. Call By Value Vs. Call By Reference Example

Getting Started with Java

Woah, wait a second..

This is a 100% free course, but we need you to first join or login to watch this video.

Alright, join or login here.

This video shows an example of call by value vs. call by reference in Java. It creates a method called modify() which is overloaded to accept an integer and a Square object. The method tries to modify both the integer and the Square object. While the original number passed while calling this method does not get altered, the original Square object changes its value.

Course Cirriculum