Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
For swapping the values you cannot use Integer class because the Integer class's objects are immutable. I mean once you have created an Integer object with a value then you cannot change its value. So you cannot use Integer class to swap two int values. Java has a class IntHolder in org.omg.CORBA package which can hold an integer value. Java also exposes the instance variable which holds the integer value. It is ////////////////// Test.java public class Test { Replies:
|
Sponsored Links
|