📄 90940a6b59f6001c1e28d57ca368f595
字号:
package com.sans.ninemen.core;
public class Utility {
public static int countChar(String position,char x) {
int length = position.length();
char[] charArray = new char[23];
charArray = position.toCharArray();
int count =0;
for(int i=0;i<23;i++) {
if(charArray[i]==x) {
count++;
}
}
return count;
}
public static String reverseColors(String position) {
System.out.println("initial="+position);
String reverse = position;
String temp1=reverse.replaceAll("W", "C");
String temp2=temp1.replaceAll("B", "W");
String temp3=temp2.replaceAll("C", "B");
System.out.println("reverse="+temp3);
return temp3;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -