mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-25 05:22:39 +08:00
Cleaned up code for some packages (#5094)
* Cleaned up code of some packages --------- Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
40cd4d86ef
commit
22310defcd
@ -9,7 +9,7 @@ package com.thealgorithms.conversions;
|
||||
*/
|
||||
public class IntegerToRoman {
|
||||
|
||||
private static int[] allArabianRomanNumbers = new int[] {
|
||||
private static final int[] allArabianRomanNumbers = new int[] {
|
||||
1000,
|
||||
900,
|
||||
500,
|
||||
@ -24,7 +24,7 @@ public class IntegerToRoman {
|
||||
4,
|
||||
1,
|
||||
};
|
||||
private static String[] allRomanNumbers = new String[] {
|
||||
private static final String[] allRomanNumbers = new String[] {
|
||||
"M",
|
||||
"CM",
|
||||
"D",
|
||||
|
@ -4,9 +4,7 @@ import java.util.*;
|
||||
|
||||
public class RomanToInteger {
|
||||
|
||||
private static Map<Character, Integer> map = new HashMap<Character, Integer>() {
|
||||
/**
|
||||
* */
|
||||
private static final Map<Character, Integer> map = new HashMap<>() {
|
||||
private static final long serialVersionUID = 87605733047260530L;
|
||||
|
||||
{
|
||||
|
@ -58,7 +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(String.valueOf(turkishChars[i]), String.valueOf(latinChars[i]));
|
||||
}
|
||||
return param;
|
||||
}
|
||||
|
Reference in New Issue
Block a user