equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1995, 2013, 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 |
26 package java.lang; |
26 package java.lang; |
27 |
27 |
28 /** |
28 /** |
29 * Thrown to indicate that an attempt has been made to store the |
29 * Thrown to indicate that an attempt has been made to store the |
30 * wrong type of object into an array of objects. For example, the |
30 * wrong type of object into an array of objects. For example, the |
31 * following code generates an <code>ArrayStoreException</code>: |
31 * following code generates an {@code ArrayStoreException}: |
32 * <blockquote><pre> |
32 * <blockquote><pre> |
33 * Object x[] = new String[3]; |
33 * Object x[] = new String[3]; |
34 * x[0] = new Integer(0); |
34 * x[0] = new Integer(0); |
35 * </pre></blockquote> |
35 * </pre></blockquote> |
36 * |
36 * |
37 * @author unascribed |
37 * @author unascribed |
38 * @since 1.0 |
38 * @since 1.0 |
39 */ |
39 */ |
40 public |
40 public |
41 class ArrayStoreException extends RuntimeException { |
41 class ArrayStoreException extends RuntimeException { |
|
42 @java.io.Serial |
42 private static final long serialVersionUID = -4522193890499838241L; |
43 private static final long serialVersionUID = -4522193890499838241L; |
43 |
44 |
44 /** |
45 /** |
45 * Constructs an <code>ArrayStoreException</code> with no detail message. |
46 * Constructs an {@code ArrayStoreException} with no detail message. |
46 */ |
47 */ |
47 public ArrayStoreException() { |
48 public ArrayStoreException() { |
48 super(); |
49 super(); |
49 } |
50 } |
50 |
51 |
51 /** |
52 /** |
52 * Constructs an <code>ArrayStoreException</code> with the specified |
53 * Constructs an {@code ArrayStoreException} with the specified |
53 * detail message. |
54 * detail message. |
54 * |
55 * |
55 * @param s the detail message. |
56 * @param s the detail message. |
56 */ |
57 */ |
57 public ArrayStoreException(String s) { |
58 public ArrayStoreException(String s) { |