8289730: Deprecated code sample in java.lang.ClassCastException
Reviewed-by: darcy
This commit is contained in:
parent
d8f4e97bd3
commit
4ad18cf088
@ -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…
x
Reference in New Issue
Block a user