View RSS Feed

Recent Blogs Posts

  1. Wiring Lists and Arrays in Spring Beans

    by , 11-16-2011 at 05:17 PM
    Often you will have situations where you will need to wire properties that are lists or arrays. If you are using Hibernate jointly with Spring, you will need to se this in order to provide the list of Hibernate mapping files. In order to do this, you will use the <list> element to wire the property in the wiring XML file for either an array property or a java.util.List property.

    For example, when you want to map Hibernate mapping files, you will wire a LocalSessionFactoryBean ...
    Bean , Configuration
  2. Copying Arrays

    by , 11-10-2011 at 06: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
  3. Serializing Arrays

    by , 11-10-2011 at 05:08 PM (My Java Tips)
    We already know that we can serialize object of classes that implement serializable interface. Make a class that implements serializable interface, make an object of it and save it to disk. You may retrieve to confirm that the object has the required data or not. Vector class also implements serializable interface, so you can also store vectors on disk.

    How about Arrays?

    Arrays are of some type. Thing to note is which classes implement Serializable interface. Integer, ...
    Java SE