public boolean putRegisterContent(int registerNumber,String content){
  try {
    registers[registerNumber]=Double.parseDouble(content);
  }
 catch (  NumberFormatException nfe) {
    return false;
  }
  return true;
}

public boolean putRegisterContent ( int registerNumber , String content ) { try { registers [ registerNumber ] = Double . parseDouble ( content ) ; } catch ( NumberFormatException nfe ) { return false ; } return true ; }
sets thw content of a register to the specified string , which must be the representation of a double value ( only in the decimal system , currently )
