Can someone please explain this code?
For back round I just found out what the fibonacci sequence is. So I was like "Yo this should be dummy easy to do in java" Then I found out I'm a total blunderhead. I had no idea where to start but I knew I had to use a for loop or while loop. But I was still lost so I googled it. I found this code that is pasted at the bottom of this text. But I don't understand it at all. Mainly the for loop. public class Fibonacci { public static void main(String[] args) { int n = 10, t1 = 0, t2 = 1; System.out.print("First " + n + " terms: "); for (int i = 1; i <= n; ++i) { System.out.print(t1 + " + "); int sum = t1 + t2; t1 = t2; t2 = sum; } } } Thanks in advance