What is the output of the following Java program?
public class test
{ public static void main(String[] args)
{
try
{
int a[]=new int[8];
a[0]=0;
a[1]=1;
for(int i=2;i<=a.length-1;i++)
{
a[i]=a[i-1]+a[i-2];
System.out.println(a[i]+" ");
}
}
catch(Exception e)
{
System.out.println(e);
}
}
}
Reveal answer
Fill a bubble to check yourself