Im working on a cash register type application, i'm running into problems when separating dollars and cents. I can get dollars by its self but not cents. This is where I'm currently at.
change 126.7328 dollars 126 cents 7328
I want cents to just be 73 instead of 7328.
String changeString = Double.toString(change);
String[] parts = changeString.split("\\.");
String part2 = parts[1];
double cents5 = Double.parseDouble(part2);
int cents = (int)cents5
Any help would be much appreciated.