View RSS Feed

Recent Blogs Posts

  1. Passing Reference Data Type Arguments

    by , 04-26-2012 at 06:23 PM
    Reference data type parameters also get passed by the value into methods. It shows that by returning methods, same objects are referred by the passed in reference. But, the objectís field value might get changed in case there is a proper access level.

    Let us take a method into consideration present in arbitrary class, which will be moving the Circle objects.
    Java Code:
    public void moveCircle(Circle circle, int deltaX, int deltaY) {
        // code to move origin of
    ...