Code example for Random

0
    super(name); 
  } 
 
  /** Example class used in test cases below. */ 
  public static class SimpleWritable implements Writable { 
    private static final Random RANDOM = new Random();
 
    int state = RANDOM.nextInt();
 
    @Override 
    public void write(DataOutput out) throws IOException {
      out.writeInt(state);
    } 
 
    @Override 
    public void readFields(DataInput in) throws IOException {
      this.state = in.readInt();
    } 
 
    public static SimpleWritable read(DataInput in) throws IOException {
Experience pair programming with AI  Get Codota for Java