src/java.base/share/classes/java/lang/InstantiationError.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 47216 71c04702a3d5
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
     1 /*
     1 /*
     2  * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    24  */
    24  */
    25 
    25 
    26 package java.lang;
    26 package java.lang;
    27 
    27 
    28 /**
    28 /**
    29  * Thrown when an application tries to use the Java <code>new</code>
    29  * Thrown when an application tries to use the Java {@code new}
    30  * construct to instantiate an abstract class or an interface.
    30  * construct to instantiate an abstract class or an interface.
    31  * <p>
    31  * <p>
    32  * Normally, this error is caught by the compiler; this error can
    32  * Normally, this error is caught by the compiler; this error can
    33  * only occur at run time if the definition of a class has
    33  * only occur at run time if the definition of a class has
    34  * incompatibly changed.
    34  * incompatibly changed.
    38  */
    38  */
    39 
    39 
    40 
    40 
    41 public
    41 public
    42 class InstantiationError extends IncompatibleClassChangeError {
    42 class InstantiationError extends IncompatibleClassChangeError {
       
    43     @java.io.Serial
    43     private static final long serialVersionUID = -4885810657349421204L;
    44     private static final long serialVersionUID = -4885810657349421204L;
    44 
    45 
    45     /**
    46     /**
    46      * Constructs an <code>InstantiationError</code> with no detail  message.
    47      * Constructs an {@code InstantiationError} with no detail  message.
    47      */
    48      */
    48     public InstantiationError() {
    49     public InstantiationError() {
    49         super();
    50         super();
    50     }
    51     }
    51 
    52 
    52     /**
    53     /**
    53      * Constructs an <code>InstantiationError</code> with the specified
    54      * Constructs an {@code InstantiationError} with the specified
    54      * detail message.
    55      * detail message.
    55      *
    56      *
    56      * @param   s   the detail message.
    57      * @param   s   the detail message.
    57      */
    58      */
    58     public InstantiationError(String s) {
    59     public InstantiationError(String s) {