Java | Functions | Question 6

Last Updated :
Discuss
Comments
Predict the output? Java
class Main {
    public static void main(String args[]) {   
             System.out.println(fun());
    }   
    static int fun(int x = 0)
    {
      return x;
    }
}
0
Garbage Value
Compiler Error
Runtime Error
Share your thoughts in the comments