Results 1 to 10 of 10
- 05-13-2012, 02:08 AM #1
Member
- Join Date
- May 2012
- Posts
- 4
- Rep Power
- 0
Formating numbers makes wierd letter insead of comma.
- 05-13-2012, 02:25 AM #2
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 762
- Rep Power
- 14
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, 02:38 AM #3
Member
- Join Date
- May 2012
- Posts
- 4
- Rep Power
- 0
- 05-13-2012, 03:06 AM #4
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 762
- Rep Power
- 14
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, 09:52 PM #5
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 29
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,
JosBuild a wall around Donald Trump; I'll pay for it.
- 05-14-2012, 03:08 AM #6
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 762
- Rep Power
- 14
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, 11:00 AM #7
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 29
- 05-14-2012, 11:52 AM #8
- 05-14-2012, 11:54 AM #9
Re: Formating numbers makes wierd letter insead of comma.
If you're forever cleaning cobwebs, it's time to get rid of the spiders.
- 05-14-2012, 12:09 PM #10
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 29
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,
JosBuild a wall around Donald Trump; I'll pay for it.
Similar Threads
-
JPanel on JFrame wierd problem
By IndiDev in forum AWT / SwingReplies: 3Last Post: 02-06-2012, 08:30 PM -
wierd NetBeans problem.
By edi.gotieb in forum Forum LobbyReplies: 2Last Post: 10-09-2010, 02:31 PM -
Formatting numbers or decimals (around comma)
By Joris in forum Advanced JavaReplies: 1Last Post: 04-22-2010, 06:46 PM -
Problem with formating comments
By Lubomirus in forum EclipseReplies: 0Last Post: 07-07-2009, 09:37 AM -
wierd problem
By f_the_cook in forum Advanced JavaReplies: 4Last Post: 10-09-2008, 06:13 PM
Bookmarks