WHEN CROWN PRINCE AKIHITO visited Walt Whitman High School in Bethesda, the students in the Japanese classes there addressed him in his own language. The prince responded with haiku he had composed. It was a charming occasion. It was also a demonstration of a remarkably successful language program at one of this area's best schools -- and a reminder that, in American high schools, Japanese is still a great rarity.

That surely is a reproach to the schools. The modest emphasis given to foreign languages in general is one of the most obvious weaknesses of American education, and the languages taught in high school are far fewer than Americans need to know. The idea of introducing Japanese to ninth graders is usually dismissed with a groan and the observation that it is a very difficult language. That's quite true, but it doesn't get any easier when it's deferred until college. On the contrary, there's a strong case for beginning the hard languages earlier rather than later.

According to a survey taken in 1985, about 11,000 high school youngsters were taking Japanese. That's more than most people would have expected, and Japanese instruction is expanding rapidly. But that number still represents well under one-tenth of 1 percent of the country's high school enrollments.

It's hard to think of another example in history of two countries with such close associations and so little knowledge of each other. The vast flow of daily transactions -- political, military and commercial -- moves through an astonishingly small number of interlocutors who know both languages, and at these crucial points of contact it is far more likely to be the Japanese partner who is bilingual.

Students here find Japanese culture appealing, teachers say, and the very complexity of the written language seems to engage bright youngsters. When a school offers Japanese, classes generally fill up quickly. High school kids seem to have caught the idea that Japan counts, and that people who know its language will have an advantage in the adult world. It's splendid that Walt Whitman has brought students to the level of ability that they demonstrated to their visitor this week. But this kind of opportunity should not be limited to students at only a few hundred of the country's most venturesome high schools