<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Courier New \;color\:black";
        panose-1:2 7 3 9 2 2 5 2 4 4;}
@font-face
        {font-family:"Courier New \;color\:\#080808";
        panose-1:2 7 3 9 2 2 5 2 4 4;}
@font-face
        {font-family:"Courier New \;color\:\#0033B3";
        panose-1:2 7 3 9 2 2 5 2 4 4;}
@font-face
        {font-family:"Courier New \;color\:\#871094";
        panose-1:2 7 3 9 2 2 5 2 4 4;}
@font-face
        {font-family:"Courier New \;color\:\#067D17";
        panose-1:2 7 3 9 2 2 5 2 4 4;}
@font-face
        {font-family:"Courier New \;color\:\#1750EB";
        panose-1:2 7 3 9 2 2 5 2 4 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New",serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.xmsonormal, li.xmsonormal, div.xmsonormal
        {mso-style-name:x_msonormal;
        margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle25
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1533955565;
        mso-list-template-ids:-1802368688;}
@list l0:level1
        {mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level4
        {mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level7
        {mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1
        {mso-list-id:1582790774;
        mso-list-template-ids:1170531124;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2
        {mso-list-id:1984194218;
        mso-list-template-ids:-1347530278;}
@list l2:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level2
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level5
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level8
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l2:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7 ;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l3
        {mso-list-id:2020768436;
        mso-list-template-ids:1359407208;}
@list l3:level1
        {mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level2
        {mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level3
        {mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level4
        {mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level5
        {mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level6
        {mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level7
        {mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level8
        {mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level9
        {mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Thank you so much for clarification, Brian.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Brian Goetz <brian.goetz@oracle.com><br>
<b>Date: </b>Wednesday, November 8, 2023 at 5:38 PM<br>
<b>To: </b>Ella Ananeva <ella.ananeva@oracle.com>, Angelos Bimpoudis <angelos.bimpoudis@oracle.com>, amber-dev@openjdk.org <amber-dev@openjdk.org><br>
<b>Subject: </b>Re: instanceof with primitive type<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:13.5pt;font-family:"Courier New",serif">Unfortunately the behavior of instanceof and switch has always been different on this matter; instanceof evaluates to false when presented with
 a null, and switch throws NPE when presented with a null.  (They both dislike nulls, but one is more tolerant than the other.) 
<br>
<br>
When we added pattern support to switch, we extended this behavior to support `null` case labels.  If a switch has a `case null`, then when given a null selector, the appropriate case will be run, rather than the switch completing abruptly with NPE.  This preserves
 compatibility with existing code, while enabling null to be treated as "just another value" if desired. 
<br>
<br>
So the NPE you are seeing is not coming from the unboxing operation in `case byte x`, but before we even enter the switch, because the first thing switch does is evaluate the selector, and if that succeeds, checks for null, and if null, and no `case null` present,
 the switch completes abruptly with NPE.  <br>
<br>
</span><o:p></o:p></p>
<div>
<p class="MsoNormal">On 11/8/2023 6:08 PM, Ella Ananeva wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Thank you very much for addressing this issue, Angelos!<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I have another question. What is our approach to treating scenarios when we use instanceof of null type with cast?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">Byte b = null;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New",serif">If (!(b instanceof byte))  System.our.println(“Yes”); //prints “Yes”</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">In the spec, <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">A reference conversion may not complete normally, namely:<o:p></o:p></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo3">An unboxing conversion may raise a
<span style="font-size:10.0pt;font-family:"Courier New",serif">NullPointerException</span><o:p></o:p></li></ol>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Here, no exception is thrown., so the behavior is as if we had a null type instanceof with a reference type in the pattern. But we have a primitive type in the pattern, so I would assume there should be some conversion going on? Precisely
 the scenario described in the assertion? BTW if I do a similar thing in switch, there will be an exception:<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Courier New \;color\:black";color:black">Byte y
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">=
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#0033B3";color:black">null</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">;<br>
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#0033B3";color:black">try
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">{<br>
    </span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#0033B3";color:black">switch
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">(</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:black";color:black">y</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">)
 {<br>
        </span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#0033B3";color:black">case byte
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">x:
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:black";color:black">System</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">.</span><i><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#871094";color:black">out</span></i><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">.println(</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#067D17";color:black">"converted"</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">);<br>
        </span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#0033B3";color:black">default</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">:
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:black";color:black">System</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">.</span><i><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#871094";color:black">out</span></i><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">.println(</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#067D17";color:black">"not
 converted"</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">);<br>
    }<br>
} </span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#0033B3";color:black">catch
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">(</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:black";color:black">NullPointerException
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">ex) {<br>
    </span><span style="font-size:10.0pt;font-family:"Courier New \;color\:black";color:black">System</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">.</span><i><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#871094";color:black">out</span></i><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">.println(</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#067D17";color:black">"Threw
 exception"</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">);<br>
}</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">This code prints “Threw exception.”<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Shouldn’t the behavior of switch and instanceof be similar in this situation?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thank you,<o:p></o:p></p>
<p class="MsoNormal">Ella<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Angelos Bimpoudis <a href="mailto:angelos.bimpoudis@oracle.com">
<angelos.bimpoudis@oracle.com></a><br>
<b>Date: </b>Wednesday, November 8, 2023 at 2:56 PM<br>
<b>To: </b>Ella Ananeva <a href="mailto:ella.ananeva@oracle.com"><ella.ananeva@oracle.com></a>,
<a href="mailto:amber-dev@openjdk.org">amber-dev@openjdk.org</a> <a href="mailto:amber-dev@openjdk.org">
<amber-dev@openjdk.org></a><br>
<b>Subject: </b>Re: instanceof with primitive type</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Hello Ella, <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Indeed. The bullet you showed is now deleted from both. The line you have put in bold, replaces the other two.
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for bringing this up.<o:p></o:p></p>
</div>
<p class="MsoNormal">Aggelos<o:p></o:p></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="0" width="100%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> amber-dev
<a href="mailto:amber-dev-retn@openjdk.org"><amber-dev-retn@openjdk.org></a> on behalf of Ella Ananeva
<a href="mailto:ella.ananeva@oracle.com"><ella.ananeva@oracle.com></a><br>
<b>Sent:</b> 08 November 2023 19:18<br>
<b>To:</b> <a href="mailto:amber-dev@openjdk.org">amber-dev@openjdk.org</a> <a href="mailto:amber-dev@openjdk.org">
<amber-dev@openjdk.org></a><br>
<b>Subject:</b> instanceof with primitive type</span> <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="xmsonormal">Hi team,<o:p></o:p></p>
<p class="xmsonormal">Reading <a href="https://cr.openjdk.org/~abimpoudis/instanceof/jep455-20231030/specs/instanceof-jls.html#jls-15.20.2">
JEP 455 spec</a>, I see this:<o:p></o:p></p>
<p><strong><span style="font-family:"Calibri",sans-serif">The type of the expression
</span></strong><em><b><span style="font-family:"Calibri",sans-serif">RelationalExpression</span></b></em><strong><span style="font-family:"Calibri",sans-serif"> can be a reference type, a primitive type</span></strong>
<strong><span style="font-family:"Calibri",sans-serif">or the null type.</span></strong><o:p></o:p></p>
<p class="xmsonormal">And then, later:<o:p></o:p></p>
<p>The following rules apply when <code><span style="font-size:10.0pt">instanceof</span></code> is the pattern match operator:<o:p></o:p></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="xmsonormal" style="mso-list:l3 level1 lfo6">The type of the expression
<em><span style="font-family:"Calibri",sans-serif">RelationalExpression</span></em> must be a reference type or the null type, or a compile-time error occurs.<o:p></o:p></li></ol>
<p class="xmsonormal"> <o:p></o:p></p>
<p class="xmsonormal">But I would expect that primitive types in patterns should be good, too. And in the freshest version of
<a href="https://mach5.us.oracle.com/mdash/buildIds/2023-11-06-1633093.angelos.bimpoudis.dev">
JEP_455 JDK</a>, both examples compile and print “Yes”:<o:p></o:p></p>
<p class="xmsonormal"> <o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:10.0pt;font-family:"Courier New \;color\:black";color:black">Integer x
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">=
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#1750EB";color:black">5</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">;<br>
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#0033B3";color:black">if
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">(</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:black";color:black">x
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#0033B3";color:black">instanceof int
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">y)
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:black";color:black">System</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">.</span><i><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#871094";color:black">out</span></i><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">.println(</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#067D17";color:black">"Yes"</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">);</span><o:p></o:p></p>
<p class="xmsonormal"> <o:p></o:p></p>
<p class="xmsonormal" style="background:white"><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#0033B3";color:black">int
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:black";color:black">x
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">=
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#1750EB";color:black">5</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">;<br>
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#0033B3";color:black">if
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">(</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:black";color:black">x
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#0033B3";color:black">instanceof
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:black";color:black">Integer
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">y)
</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:black";color:black">System</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">.</span><i><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#871094";color:black">out</span></i><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">.println(</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#067D17";color:black">"Yes"</span><span style="font-size:10.0pt;font-family:"Courier New \;color\:\#080808";color:black">);</span><o:p></o:p></p>
<p class="xmsonormal"> <o:p></o:p></p>
<p class="xmsonormal">Shouldn’t the spec be updated?<o:p></o:p></p>
<p class="xmsonormal"> <o:p></o:p></p>
<p class="xmsonormal">Thank you,<o:p></o:p></p>
<p class="xmsonormal">Ella Ananeva<o:p></o:p></p>
</div>
</div>
</div>
</div>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>