Short Crazy Quiz Java
[In The Last Java Quiz In SoloLearn] /** Start Quiz **/ What is the output of the following code? int f=1, i=2; while(++i<5) f*=i; System.out.println(f); /** End Quiz **/ Please help me ! The Correct Answer Is : 12; Buttttttt !!! I Don't know Why not 48 Or 60 :/ . " ++i will increment the value of i, and then return the incremented value. " f=1 i=2 --First Loop i (in the while) =2 , original i = 3 because ++i; f = 3 because 1*3 = 3; --Second Loop i (in the while) = 3, original i = 4 because ++i; f = 12 because 3*4 = 12; --third Loop i (in the while) = 4, original i = 5 because ++i; f = 60 because 12*5 = 60; Whyyyyyyyyyyyyyyyyyyyyyyyy The Answer is 12 ????????! I will kill myself if I do not know why ! :\(