What is the use of underline (_) in the situations below:
float pi = 3.14159_26535_89793_23846;
long bytes = 00101001_00100110_01100001;
int n = 1____________________1;
What is the use of underline (_) in the situations below:
float pi = 3.14159_26535_89793_23846;
long bytes = 00101001_00100110_01100001;
int n = 1____________________1;
It only serves to make reading easier. The compiler ignores them. For example, this:
private long milisegundosNoDia = 86_400_000;
It's easier to read (by a human) than this:
private long milisegundosNoDia = 86400000;