Results 1 to 10 of 10
- 05-13-2012, 01:08 AM #1
Member
- Join Date
- May 2012
- Posts
- 4
- Rep Power
- 0
Formating numbers makes wierd letter insead of comma.
- 05-13-2012, 01:25 AM #2
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 696
- Rep Power
- 6
Re: Formating numbers makes wierd letter insead of comma.
It should work fine that way. Is there anything special with your Windows command prompt? Try display the string using a Swing component to see if the command prompt is the problem. Use the code below.
Java Code:JOptionPane.showMessageDialog(null, y);
Website: Learn Java by Examples
- 05-13-2012, 01:38 AM #3
Member
- Join Date
- May 2012
- Posts
- 4
- Rep Power
- 0
- 05-13-2012, 02:06 AM #4
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 696
- Rep Power
- 6
Re: Formating numbers makes wierd letter insead of comma.
Is there any possibility that it was not a comma that you type in your code? Which editor that you use to write the code? There something going on with the source file I guess.
Website: Learn Java by Examples
- 05-13-2012, 08:52 PM #5
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,422
- Blog Entries
- 7
- Rep Power
- 17
Re: Formating numbers makes wierd letter insead of comma.
That funny character is a locale specific separator character but your font can't display it.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 05-14-2012, 02:08 AM #6
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 696
- Rep Power
- 6
Re: Formating numbers makes wierd letter insead of comma.
It means that the OP operating system default locale might be set to something that the output system can't display?
Website: Learn Java by Examples
- 05-14-2012, 10:00 AM #7
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,422
- Blog Entries
- 7
- Rep Power
- 17
Re: Formating numbers makes wierd letter insead of comma.
When people rob a bank they get a penalty; when banks rob people they get a bonus.
- 05-14-2012, 10:52 AM #8
- 05-14-2012, 10:54 AM #9
Re: Formating numbers makes wierd letter insead of comma.
Why do they call it rush hour when nothing moves? - Robin Williams
- 05-14-2012, 11:09 AM #10
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,422
- Blog Entries
- 7
- Rep Power
- 17
Re: Formating numbers makes wierd letter insead of comma.
That explains it all; look how that dialog displays the number; possibly that's how the OP's locale wants to display it (groups of three digits separated by a space character); of course that silly MS Windows shell can't display those characters ...
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
Similar Threads
-
JPanel on JFrame wierd problem
By IndiDev in forum AWT / SwingReplies: 3Last Post: 02-06-2012, 07:30 PM -
wierd NetBeans problem.
By edi.gotieb in forum Forum LobbyReplies: 2Last Post: 10-09-2010, 01:31 PM -
Formatting numbers or decimals (around comma)
By Joris in forum Advanced JavaReplies: 1Last Post: 04-22-2010, 05:46 PM -
Problem with formating comments
By Lubomirus in forum EclipseReplies: 0Last Post: 07-07-2009, 08:37 AM -
wierd problem
By f_the_cook in forum Advanced JavaReplies: 4Last Post: 10-09-2008, 05:13 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote


Bookmarks