I'll keep it short. I've got this basic java code:
int listLength = sc.nextInt();
double[] list = new double[listLength];
for(int i = 0; i < list.length; i++){
list[i] = sc.nextDouble();
}
When I input 1 12345678901234567
Now if I execute this line:
System.out.println(list[0] == 12345678901234568.0 && list[0] == 12345678901234567.0);
The console will print: true
If I just print list[0], it prints 12345678901234568
I ask the console to print if a double value is 2 different numbers and it says it's true. How is this possible?