File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
src/com/jwetherell/algorithms/numbers Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 5
5
import java .util .Map ;
6
6
7
7
public class Integers {
8
+ // Constant representing one billion (1,000,000,000)
9
+ private static final int BILLION = 1000000000 ;
10
+
11
+ // Constant representing one million (1,000,000)
12
+ private static final int MILLION = 1000000 ;
13
+
14
+ // Constant representing one thousand (1,000)
15
+ private static final int THOUSAND = 1000 ;
16
+
17
+ // Constant representing one hundred (100)
18
+ private static final int HUNDRED = 100 ;
19
+
20
+ // Constant representing ten (10)
21
+ private static final int TEN = 10 ;
8
22
9
23
private static final BigDecimal ZERO = new BigDecimal (0 );
10
24
private static final BigDecimal TWO = new BigDecimal (2 );
@@ -137,12 +151,6 @@ public static final boolean powerOfTwoUsingBits(int numberToCheck) {
137
151
multiDigits .put (90 ,"ninety" );
138
152
}
139
153
140
- private static final int BILLION = 1000000000 ;
141
- private static final int MILLION = 1000000 ;
142
- private static final int THOUSAND = 1000 ;
143
- private static final int HUNDRED = 100 ;
144
- private static final int TEN = 10 ;
145
-
146
154
private static final String handleUnderOneThousand (int number ) {
147
155
StringBuilder builder = new StringBuilder ();
148
156
int x = number ;
You can’t perform that action at this time.
0 commit comments