Hey Harsh,
This issue does not look me like of RAD region being I executed the code using the command line/eclipse in
java 5 and I also got the class cast exception at run time.
I guess, the root cause is something else. Can it be running in some of our friends machine just because they have java 6 rather than java5. Btw if you tweak the code a bit number to integer casting works fine. The below code works fine
Regards
Salil Verma