This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
none of u answer my question except Roy Ben Ami the array method is which actually works.thanks(why it didnt strike to ) now this is for people who suggested using wrapper classes i think they are immutable and hence of no use. i know about the suff of pass by value & pass by reference. so those of u think it can be done by wrapper classes please give me an example(which i think is not possible ) p.s. cindy and eric u have missed my point and explained something else sorry any other clean method except array one? i think java can do better than that.