Consider the following code segment. int num = 2574;int resu…
Consider the following code segment. int num = 2574;int result = 0;while (num > 0){ result = result* 10 + num % 10; num /= 10;}System.out.println(result); What is printed as a result of executing the code segment?
Read Details