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); } }

12th Sep 2016, 12:34 PM
Sourabh jain
Sourabh jain - avatar
1 Resposta
+ 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); } }
12th Sep 2016, 12:41 PM
Zen
Zen - avatar