Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!news.glorb.com!postnews.google.com!k27g2000pri.googlegroups.com!not-for-mail From: byhesed Newsgroups: comp.lang.java.programmer Subject: Re: Isn't an array to int primitive? Date: Sat, 7 May 2011 22:13:03 -0700 (PDT) Organization: http://groups.google.com Lines: 23 Message-ID: <688dfa8b-c31d-4372-8210-e8417a821866@k27g2000pri.googlegroups.com> References: <0e7f2c35-bdb5-4a35-b695-7a18dad4b567@f31g2000pri.googlegroups.com> NNTP-Posting-Host: 220.149.108.22 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1304831583 11266 127.0.0.1 (8 May 2011 05:13:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 8 May 2011 05:13:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k27g2000pri.googlegroups.com; posting-host=220.149.108.22; posting-account=v_GC8QoAAABz34PprEBWdejdnnHZvg4_ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3783 On 5=EC=9B=948=EC=9D=BC, =EC=98=A4=ED=9B=842=EC=8B=9C07=EB=B6=84, byhesed <= byhe...@gmail.com> wrote: > I know that primitive type variables cannot be converted to class > type, right? > But, how can the below code operate well? > > =E3=80=80=E3=80=80=E3=80=80System.out.println(new int[10] instanceof Obje= ct); > > The result is "true". > > I am thinking that it is weird. > Isn't the anonymous array primitive type, is it? > Then, how can it be converted to class type, in this case, Object? > > I think I know something incorrectly. > Please correct my wrong idea. Sorry. I've just solved my question. The book says that "Arrays are objects." Thank you.