Click here to Skip to main content
15,796,456 members
Home / Discussions / Java
   

Java

 
PinnedForum Guidelines - PLEASE READ Pin
Chris Maunder28-Jul-09 3:36
cofounderChris Maunder28-Jul-09 3:36 
QuestionJava strings Pin
mike74114-Dec-23 17:12
mike74114-Dec-23 17:12 
AnswerRe: Java strings Pin
Richard MacCutchan4-Dec-23 23:17
mveRichard MacCutchan4-Dec-23 23:17 
GeneralRe: Java strings Pin
Andre Oosthuizen5-Dec-23 9:47
mveAndre Oosthuizen5-Dec-23 9:47 
GeneralRe: Java strings Pin
Richard MacCutchan5-Dec-23 10:26
mveRichard MacCutchan5-Dec-23 10:26 
AnswerRe: Java strings Pin
jschell5-Dec-23 6:26
jschell5-Dec-23 6:26 
GeneralRe: Java strings Pin
trønderen5-Dec-23 12:29
trønderen5-Dec-23 12:29 
GeneralRe: Java strings Pin
jschell15hrs 43mins ago
jschell15hrs 43mins ago 
GeneralRe: Java strings Pin
trønderen12hrs 23mins ago
trønderen12hrs 23mins ago 
AnswerRe: Java strings Pin
Gerry Schmitz14hrs 26mins ago
mveGerry Schmitz14hrs 26mins ago 
Question<pre>Problems enlarging Eclipse icons Pin
BrunoV202219-Nov-23 11:57
BrunoV202219-Nov-23 11:57 
AnswerRe: <pre>Problems enlarging Eclipse icons Pin
jschell5-Dec-23 6:27
jschell5-Dec-23 6:27 
QuestionHow to convert string to double with trailing zeros after decimal Pin
Member 161354338-Nov-23 2:46
Member 161354338-Nov-23 2:46 
AnswerRe: How to convert string to double with trailing zeros after decimal Pin
Richard MacCutchan8-Nov-23 3:07
mveRichard MacCutchan8-Nov-23 3:07 
GeneralRe: How to convert string to double with trailing zeros after decimal Pin
Member 161354338-Nov-23 3:23
Member 161354338-Nov-23 3:23 
GeneralRe: How to convert string to double with trailing zeros after decimal Pin
Richard MacCutchan8-Nov-23 3:35
mveRichard MacCutchan8-Nov-23 3:35 
GeneralRe: How to convert string to double with trailing zeros after decimal Pin
Dave Kreskowiak8-Nov-23 4:20
mveDave Kreskowiak8-Nov-23 4:20 
GeneralRe: How to convert string to double with trailing zeros after decimal Pin
jschell8-Nov-23 7:12
jschell8-Nov-23 7:12 
Member 16135433 wrote:
the same need to be converted to double and send with out ignoring trailing zeros


Breaking that down into steps
1. String arrives
2. Convert to double
3. Something happens????
4. Then "send".

Unless something happens at step 3 which you did not define then of course you do not need to convert it in the first place.

That is because "send" in the modern world always means a string. XML, HTML, Json, even many other representations in TCP/IP will always be a string.

The only time when that is not true is when you are using a binary format and there can be all sorts for complications with that (precision, big versus, little, etc)

So presuming there is in fact a real need to handle it as a double then when you "send" it you must format it correctly. Just as though you started with a double in first place. In other words how it arrives is irrelevant.
AnswerRe: How to convert string to double with trailing zeros after decimal Pin
Ralf Meier8-Nov-23 9:02
professionalRalf Meier8-Nov-23 9:02 
AnswerRe: How to convert string to double with trailing zeros after decimal Pin
Dave Kreskowiak8-Nov-23 3:23
mveDave Kreskowiak8-Nov-23 3:23 
QuestionHow to use JNI without setting Environment Variables Pin
Valentinor16-Oct-23 1:54
Valentinor16-Oct-23 1:54 
AnswerRe: How to use JNI without setting Environment Variables Pin
Valentinor16-Oct-23 2:42
Valentinor16-Oct-23 2:42 
AnswerRe: How to use JNI without setting Environment Variables Pin
jschell16-Oct-23 5:58
jschell16-Oct-23 5:58 
GeneralRe: How to use JNI without setting Environment Variables Pin
Valentinor16-Oct-23 6:41
Valentinor16-Oct-23 6:41 
GeneralRe: How to use JNI without setting Environment Variables Pin
jschell17-Oct-23 6:47
jschell17-Oct-23 6:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.