Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » No console output of comma
No console output of comma [message #1722328] Thu, 04 February 2016 07:53
Black Smith is currently offline Black SmithFriend
Messages: 1
Registered: February 2016
Junior Member
Hi,
I use eclipse ide for java for java programming. I want to format 10999.9999 to 11,000.00. Here is the code I wrote:
String x = "10999.9999";
double y = Double.parseDouble(x);
DecimalFormat formatter = new DecimalFormat("#,###.00");
System.out.println(formatter.format(y));

Then it gives output 11000.00 , no comma. I compiled the code with CMD with same jjdk1.8.0_05 and it works perfectly. I tried almost every other way to compile the code but it hasn't worked yet.

In my eclipse, I can never print comma and few other characters like # ; in console. I tried just to print comma as char value and it shows console blank. Please help me........
index.php/fa/24887/0/
index.php/fa/24888/0/
index.php/fa/24891/0/
index.php/fa/24892/0/
  • Attachment: Capture1.PNG
    (Size: 8.46KB, Downloaded 456 times)
  • Attachment: Capture2.PNG
    (Size: 4.05KB, Downloaded 338 times)
  • Attachment: Capture3.PNG
    (Size: 4.23KB, Downloaded 495 times)
  • Attachment: Capture4.PNG
    (Size: 5.17KB, Downloaded 336 times)
Previous Topic:Java library path set for AST View
Next Topic:IElementChangedListener and Source Attachments
Goto Forum:
  


Current Time: Fri Apr 26 12:48:04 GMT 2024

Powered by FUDForum. Page generated in 0.02528 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top