Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
If this was a string and it was parsed as a double. Would java be able to process this as the expected value or would I need to change the format of these numbers? Would I need to remove the "+" or change e to "E"?
1.3870574e+01
The string parsed to a double just fine on my system.
See Double.valueOf(String str)
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 days ago.
Improve this question
I have a string like "{hello}{bye}"
How can I split() the string so my output is ["{hello}, "{bye}"]
I have tried splitting with "}{" but it leaves me without the }{.
Have also tried .split("((?<=})|(?={))") but I get a "number expected" syntax error beneath the {
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I have this code:
item.replaceAll("\\s+", " ")
and this is the string
"The census request file for completion has been attached. In addition, the attached Client Checklist "
It doesn't work: double space remains after the period, so ". If" is unchanged.
I don't understand WHY!?
Since String.replaceAll() method is not an in-place operation, you should write like this:
item = item.replaceAll("\\s+", " ")
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
When using Java, what is the difference between the two following assignments:
String upperCaseDataType = "myName";
string lowerCaseDataType = "myName";
Do the 2 mean the same at compile time, just like in C#?
Thanks very much for your help.
string is not a class or type in Java
No. string s = "myName"; is not legal Java, and will not compile. Also, those are assignments (not assertions).
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I'm trying to use a line chart with floating point values
This is an example of integer 1 and 2 for axes
series1.set(1,2);
How to insert 1,2 and 2,3
series1.set(1,2 , 2,3);
Try series1.set(1.2 , 2.3);use '.' instead of ','
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
i am using util.Scanner to read input from the user. I don't understand how to read a long datatype value.
Scanner scr=new Scanner(System.in);
long l=scr.nextInt();
I am unable to read 64-bit data using the above code — it just gives me an input mismatch exception.
use the nextLong method :
long l=scr.nextLong();