Web で Java のサンプル コードをいくつか見てみると、次の構文に出くわしました。
public class WordCount {
public static class Map extends Mapper<LongWritable, Text, Text, IntWritable> {
private final static IntWritable one = new IntWritable(1);
private Text word = new Text();
public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
//...
}
}
//...
}
静的クラスが別のクラスから継承できない C# のバックグラウンドから来て、クラスのextends
後のキーワードについて少し混乱しましたMap
。静的クラスを拡張するとはどういう意味ですか? また、どのような利点がありますか?