*When dealing with strings, you may also wish to use the following to get primitives from the Object String:

Integer:
int i = Integer.parseInt(“234”);

Double
double d = Double.parseDouble(“234.6576533254”);

Float:
float f = Float.parseFloat(“234.78”);

Long:
long l = Long.parseLong(“23454654”);

*Note: You may wish to add the ().trim feature to these last ones in the case of extra white space around your String, which may cause exceptions.Example of trim:
String s = ” William “; // displays as ‘ William ‘
String s2 = (s).trim(); //displays ‘William’