8289730: Deprecated code sample in java.lang.ClassCastException

Reviewed-by: darcy
This commit is contained in:
ScientificWare 2022-07-06 08:19:40 +00:00 committed by Andrey Turbanov
parent d8f4e97bd3
commit 4ad18cf088

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1994, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1994, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -30,7 +30,7 @@ package java.lang;
* to a subclass of which it is not an instance. For example, the
* following code generates a {@code ClassCastException}:
* <blockquote><pre>
* Object x = new Integer(0);
* Object x = Integer.valueOf(0);
* System.out.println((String)x);
* </pre></blockquote>
*