ok i'm tryiing to convert a double into a string to get the 1st character of that number.

change = (amountPaid - total);
String dollars = Double.toString(change);
String firstNum = dollars.charAt(0);

i got an imcompatiable type error on that part.

change, amountPaid, total are double.

nevermind i got it.

Please copy and paste the full text of the error message.
What does the API doc say is the type returned by the String charAt() method? Is it String?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.