public class UnIntentionalObjectCreation {
private static Byte sumOfIntegerUptoN(Byte N) {
Byte sum = 0;
for (Byte i = 0; i < N; i++) {
sum += i;
}
System.out.println(sum);
return sum;
}
public static void main(String[] args) {
long start = System.currentTimeMillis();
sumOfIntegerUptoN(10);
long end = System.currentTimeMillis();
System.out.println((end - start));
}
}
Error in 6 line :- Inconvertible type found Error in 14 line:- UnIntentionalObjectCreation cannot be applined to (int)