x修改功能

main
zxh 2 months ago
parent d258995714
commit 0018355828

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" default="true" project-jdk-name="openjdk-23" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_22" project-jdk-name="openjdk-23" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

@ -2,8 +2,7 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/.idea/elt.iml" filepath="$PROJECT_DIR$/.idea/elt.iml" /> <module fileurl="file://$PROJECT_DIR$/uml/uml.iml" filepath="$PROJECT_DIR$/uml/uml.iml" />
<module fileurl="file://$PROJECT_DIR$/text1/text1.iml" filepath="$PROJECT_DIR$/text1/text1.iml" />
</modules> </modules>
</component> </component>
</project> </project>

@ -5,14 +5,7 @@ import java.util.Scanner;
public class BaseConverter { public class BaseConverter {
/**
*
*
* @param numStr
* @param fromBase
* @param toBase
* @return
*/
public static String convertBase(String numStr, int fromBase, int toBase) { public static String convertBase(String numStr, int fromBase, int toBase) {
// 验证进制是否合法 // 验证进制是否合法
if (fromBase < 2 || fromBase > 16 || toBase < 2 || toBase > 16) { if (fromBase < 2 || fromBase > 16 || toBase < 2 || toBase > 16) {

Loading…
Cancel
Save