Directly u can't cast a String variable into a Long.
Becoz String is an immediate child of Object class, so u can't directly cast
String into any other types except an Object class.
(Def. u know Object is the parent of all classes, so virtually u can't cast
a String variable into other types)
IF I AM WRONG PLZ LET ME KNOW...
But there are very simple,static methods like
new Long(String)
Long.parseLong(String)
which will return long values.
u can use these to convert a String value to Long (Wrapper class) /
long(primitive).