Lesson 18 of 24 · +110 xp
Static Method
Belongs to class.
Explained simply
Your task
Write: public static int abs(int x) { return x < 0 ? -x : x; }
Lesson 18 of 24 · +110 xp
Belongs to class.
Write: public static int abs(int x) { return x < 0 ? -x : x; }