Satyam Pandey
correct the errors in the following programme


public class Test {
public static method1(int n, m) {
n += m;
method2(3.4);
}

public static int method2(int n) {
if (n > 0) return 1;
else if (n == 0) return 0;
else if (n < 0) return –1;
}
}
Like · Comment ·

Joydip Panchal

There are three errors. (1) public static method1(int n, m) Specify here var m's datatype (2) specify method1's return type (3) method2's argument datatype missmatch
Like · 2 ·
Download Android App