Let's say I have following number:
36702514
I want to separate the above number into 3 parts, which is 36, 702, 514.
Below is the code that I tried:
int num = 36702514;
int num1 = num.substring(0, 2);
int num2 = num.substring(2, 3);
int num3 = num.substring(5, 3);
Am I writing correct?