0
Coma (,) vs point (.) In Java
I have a big question, in my last post https://www.sololearn.com/discuss/531927/?ref=app I had a problem with decimal point in Java, because here in Mexico I use the point 3.7, not the coma, 3,7 But my question, when you are coding and you need to use numbers with decimal point, do you use the coma or the point? when I'm coding Do I need to think the numbers with coma or point? what is better? it is better to use coma or point in numbers?
4 Réponses
+ 1
you need to use the decimal (.) for double and float values.
+ 1
but in eclipse if I use the decimal (.) in the input I get an error, does this occur with another's ides?
0
I'll have to try it when I get the chance to. It very well could be that Java is different between regions, and for you its a comma? but I doubt it. what's the error exactly?
0
check the post, there I put the error that I got in eclipse, the problem occurs when I use the decimal in the input, because of that, I need to use some additional code to solve the problem and be able to use the decimal (in the post is everything).
But when I used the coma in the input, I don't have any problem, and I don't need the additional code.
https://www.sololearn.com/discuss/531927/?ref=app