designexamples-cast.html

来自「经典的数据结构源代码(java 实现)」· HTML 代码 · 共 19 行

HTML
19
字号
<html><head><title>Code Fragment</title></head><body text=#000000><center></center><br><br><dl><dd><pre>    <font color=#8000a0>Number </font>n;    <font color=#8000a0>Integer </font>i;    n = <font color=#8000a0><font color=#ff8000>new</font> </font><font color=#0000ff>Integer</font>(3);    i =<font color=#0000ff> </font>(Integer) n;      <font color=#ff0080>// This is legal</font>    n = <font color=#8000a0><font color=#ff8000>new</font> </font><font color=#0000ff>Double</font>(3.1415);    i =<font color=#0000ff> </font>(Integer) n;      <font color=#ff0080>// This is illegal!</font></dl></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?