Ramu: If you want to convert a primitive type into an object, you would normally use one of the type wrappers built into java.lang. These include Integer Double Float Byte Short Long Char Here is an example.
For my latest books on Java, including Introducing JavaFX 8 Programming, see HerbSchildt.com
Note that the coming Java 1.5 compilers will have a feature known as auto-boxing and auto-unboxing. Primitives won't be cast to objects, but in certain circumstances, the compiler will wrap a primitive up using the appropriate wrapper class, and unwrap wrapper class instances into the appropriate primitive values.