17
Looking at some java example codes in the web I came across the following syntax:
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 {
//...
}
}
//...
}
Coming from C# background, where static classes cannot inherit from another class, I was a little confused about the extends keyword after the Map class. What does it mean to extend a static class, and what advantages does it provide?