View RSS Feed

Java Array

Java arrays.

  1. arrays are passed by reference

    by , 03-04-2012 at 11:20 AM
    By reference, array is passed to functions. Or it is passed to original as a pointer. This shows that anything which happens to an array in a function would be affecting the original.

    For understanding an array is passed by reference

    Step 1) In editor, code shall be copied

    Java Code:
    class ArrayDemo {
       public static void passByReference(String a[]);
         a[1] = "Changed";
       public static