Scanning doubles when I separate decimals with comma or dot
问题 I'm rather new to Java and I was making a simple calculator. Problem is when I my input number is for example "3.1" it gives an exception error, but when writing "3,1" it works just fine. My friend, however, has a slightly more advanced calculator (with string parsing) and when I run his code the opposite happens: 3,1 gives exception error, 3.1 works perfectly. I was looking forward to know what causes these different behaviors. I made this simple sum just now and the same happens, I'll edit