mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-25 05:22:39 +08:00
Add automatic linter (#4214)
This commit is contained in:
@ -30,8 +30,7 @@ public class AnyBaseToAnyBase {
|
||||
try {
|
||||
System.out.print("Enter number: ");
|
||||
n = in.next();
|
||||
System.out.print("Enter beginning base (between " + MINIMUM_BASE + " and "
|
||||
+ MAXIMUM_BASE + "): ");
|
||||
System.out.print("Enter beginning base (between " + MINIMUM_BASE + " and " + MAXIMUM_BASE + "): ");
|
||||
b1 = in.nextInt();
|
||||
if (b1 > MAXIMUM_BASE || b1 < MINIMUM_BASE) {
|
||||
System.out.println("Invalid base!");
|
||||
@ -41,8 +40,7 @@ public class AnyBaseToAnyBase {
|
||||
System.out.println("The number is invalid for this base!");
|
||||
continue;
|
||||
}
|
||||
System.out.print(
|
||||
"Enter end base (between " + MINIMUM_BASE + " and " + MAXIMUM_BASE + "): ");
|
||||
System.out.print("Enter end base (between " + MINIMUM_BASE + " and " + MAXIMUM_BASE + "): ");
|
||||
b2 = in.nextInt();
|
||||
if (b2 > MAXIMUM_BASE || b2 < MINIMUM_BASE) {
|
||||
System.out.println("Invalid base!");
|
||||
|
@ -22,8 +22,7 @@ public class DecimalToAnyBase {
|
||||
|
||||
System.out.println("Decimal Input"
|
||||
+ " is: " + decInput);
|
||||
System.out.println("Value of " + decInput + " in base " + base
|
||||
+ " is: " + convertToAnyBase(decInput, base));
|
||||
System.out.println("Value of " + decInput + " in base " + base + " is: " + convertToAnyBase(decInput, base));
|
||||
|
||||
br.close();
|
||||
}
|
||||
|
@ -61,8 +61,7 @@ public class HexToOct {
|
||||
hexadecnum = scan.nextLine();
|
||||
|
||||
// first convert hexadecimal to decimal
|
||||
decnum = hex2decimal(
|
||||
hexadecnum); // Pass the string to the hex2decimal function and get the decimal form in
|
||||
decnum = hex2decimal(hexadecnum); // Pass the string to the hex2decimal function and get the decimal form in
|
||||
// variable decnum
|
||||
|
||||
// convert decimal to octal
|
||||
|
@ -126,8 +126,7 @@ public class RgbHsvConversion {
|
||||
return bHue && bSaturation && bValue;
|
||||
}
|
||||
|
||||
private static int[] getRgbBySection(
|
||||
double hueSection, double chroma, double matchValue, double secondLargestComponent) {
|
||||
private static int[] getRgbBySection(double hueSection, double chroma, double matchValue, double secondLargestComponent) {
|
||||
int red;
|
||||
int green;
|
||||
int blue;
|
||||
|
@ -58,8 +58,7 @@ public class TurkishToLatinConversion {
|
||||
'G',
|
||||
};
|
||||
for (int i = 0; i < turkishChars.length; i++) {
|
||||
param = param.replaceAll(
|
||||
new String(new char[] {turkishChars[i]}), new String(new char[] {latinChars[i]}));
|
||||
param = param.replaceAll(new String(new char[] {turkishChars[i]}), new String(new char[] {latinChars[i]}));
|
||||
}
|
||||
return param;
|
||||
}
|
||||
|
Reference in New Issue
Block a user