String msg = "The quick brown fox jumps over the lazy dog."; void main() { System.out.printf( "文字 'a' は %d 文字目に現れます。%n", msg.indexOf('a')); // ... }