View RSS Feed

Recent Blogs Posts

  1. Copying Arrays

    by , 11-10-2011 at 05:10 PM (My Java Tips)
    Arrays are very useful and are commonly used in our Java programs. Array name is actually a pointer that points to the continuous memory location. Many Java developers make some mistakes while copying arrays, which become difficult to cater.

    Consider the following scenario:

    I have a String array called 'array' which have 5 elements in it. I declared another String array called 'array_tmp'. I want to copy the contents of 'array' to 'array_tmp'. One simple way is to do ...
    Tags: arrays, copying Add / Edit Tags
    Java SE