都转换成大写字母即可 import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); String str=sc.next().toUpperCase(); char ch=sc.next().charAt(0); int count=getCount(str,ch); System.out.print(count); } ...