What is the output of the following Java program?
public class Main {
static int a = get();
static int b = 5;
static int get() { return b + 1; }
public static void main(String[] args) {
System.out.println(a + " " + b);
}
}- ACompilation error: illegal forward reference
- B6 5
- C0 5
- D1 5
Correct answer: D