Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Jon Chan

Greenhorn
+ Follow
since Sep 21, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jon Chan

Please study the classes of java.util.regex
18 years ago
Also the classes of java.util.regex may help
18 years ago
Hi,
java.text.NumberFormat may help you to find out the solution.
18 years ago
Oh! the simplest solution is to use "double".
18 years ago
For a quick and dirty method:
pass it as follows:
.....&list=abc|def|ghi&...........
And then use StringTokenizer to handle the value.
18 years ago
Thanks raimondas zemaitis!
The problem is the java's float may show a different value with the orignal one (ie 6575591.95 -> 6575592.00 ). I want a method to bypass to convert to float to show the show the value with formating (ie, ###,##0.000)
18 years ago
Hi All,
I used BigDecimal instead of float to handle floating number between
db <-> object or calculation. However, there is still a problem for me to display the floating number value to user. I got a clumsy method to display a floating number:
1. use BigDecimal's toString() method.
2. spilt the string into two parts (xxxx.yyy).
3. format two parts (x,xxx.yyy).
Did anyone has another idea to solve that problem?
Thank in advance,
18 years ago