What is the output of the following code?
public class Main { public static void main(String args[]) { int total = 0; for (int i = 0; i < 10; i++) { total += i;/* w ww .j a v a 2 s .c o m*/ } System.out.println(total); } }
Click to view the answer
45