Find the error in the following program: Public class FindTheError { Public static void main(String[] args) {

Question:

Find the error in the following program: 

Public class FindTheError
{
 Public static void main(String[] args)
 {
 MyMethod(0);
 }
 Public static void myMethod(int num)
 {
 System.out.print(num + " ");
 MyMethod(num + 1);
 }
}

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: