mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8289730: Deprecated code sample in java.lang.ClassCastException
Reviewed-by: darcy
This commit is contained in:
parent
d8f4e97bd3
commit
4ad18cf088
1 changed files with 2 additions and 2 deletions
|
@ -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>
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue