0
debug the following code and please explain
public class Program { public static void main(String[] args) { int a = -66; Math.abs (a); System.out.println(a); } }
1 Answer
+ 2
public class Program {
public static void main(String[] args) {
int a = -66;
System.out.println(Math.abs(a));
}
}
or if you want to change the value of a
public class Program {
public static void main(String[] args) {
int a = -66;
a = Math.abs(a);
System.out.println(a);
}
}