Skip to content

Commit b1d4be7

Browse files
committed
docs: update AnyBaseToAnyBase and GenericTree
1 parent 36dc276 commit b1d4be7

File tree

3 files changed

+230
-316
lines changed

3 files changed

+230
-316
lines changed

Conversions/AnyBaseToAnyBase.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@
1515
*/
1616
public class AnyBaseToAnyBase {
1717

18-
// Smallest and largest base you want to accept as valid input
18+
/**
19+
* Smallest and largest base you want to accept as valid input
20+
*/
1921
static final int MINIMUM_BASE = 2;
2022
static final int MAXIMUM_BASE = 36;
2123

22-
// Driver
2324
public static void main(String[] args) {
2425
Scanner in = new Scanner(System.in);
2526
String n;
26-
int b1 = 0, b2 = 0;
27+
int b1, b2;
2728
while (true) {
2829
try {
2930
System.out.print("Enter number: ");
@@ -64,7 +65,7 @@ public static boolean validForBase(String n, int base) {
6465
char[] digitsForBase = Arrays.copyOfRange(validDigits, 0, base);
6566

6667
// Convert character array into set for convenience of contains() method
67-
HashSet<Character> digitsList = new HashSet();
68+
HashSet<Character> digitsList = new HashSet<>();
6869
for (int i = 0; i < digitsForBase.length; i++)
6970
digitsList.add(digitsForBase[i]);
7071

0 commit comments

Comments
 (0)