We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8f4e97 commit 4ad18cfCopy full SHA for 4ad18cf
src/java.base/share/classes/java/lang/ClassCastException.java
@@ -1,5 +1,5 @@
1
/*
2
- * Copyright (c) 1994, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2022, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
30
* to a subclass of which it is not an instance. For example, the
31
* following code generates a {@code ClassCastException}:
32
* <blockquote><pre>
33
- * Object x = new Integer(0);
+ * Object x = Integer.valueOf(0);
34
* System.out.println((String)x);
35
* </pre></blockquote>
36
0 commit comments