< prev index next >

## src/java.base/share/classes/java/util/Random.java

Print this page

    *** 1177,10 ***
    --- 1177,14 ---
          };

          /**
           * Reconstitute the {@code Random} instance from a stream (that is,
           * deserialize it).
    +      *
    +      * @param  s the {@code ObjectInputStream} from which data is read
    +      * @throws IOException if an I/O error occurs
    +      * @throws ClassNotFoundException if a serialized class cannot be loaded
           */
          @java.io.Serial
          private void readObject(java.io.ObjectInputStream s)
              throws java.io.IOException, ClassNotFoundException {

    *** 1197,10 ***
    --- 1201,13 ---
              haveNextNextGaussian = fields.get("haveNextNextGaussian", false);
          }

          /**
           * Save the {@code Random} instance to a stream.
    +      *
    +      * @param  s the {@code ObjectOutputStream} to which data is written
    +      * @throws IOException if an I/O error occurs
           */
          @java.io.Serial
          private synchronized void writeObject(ObjectOutputStream s)
              throws IOException {

< prev index next >