We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a58f3f3 commit af47b0eCopy full SHA for af47b0e
java-ejercicios/src/main/java/quick/App
@@ -0,0 +1,19 @@
1
+package me.froy;
2
+
3
+import java.math.BigDecimal;
4
+import java.util.Objects;
5
6
+public class App {
7
8
+ public static void main(String[] args) {
9
+ System.out.println(isMayorCero(BigDecimal.TEN));
10
+ System.out.println(isMayorCero(BigDecimal.ZERO));
11
+ System.out.println(isMayorCero(new BigDecimal(-1)));
12
+ System.out.println(isMayorCero(null));
13
+ }
14
15
+ private static boolean isMayorCero(BigDecimal value) {
16
+ Objects.requireNonNull(value, "El valor es Requerido.");
17
+ return value.compareTo(BigDecimal.ZERO) == 1;
18
19
+}
0 commit comments