From tansa.solo at gmail.com Wed Mar 2 21:28:26 2016 From: tansa.solo at gmail.com (Lestari N.S) Date: Thu, 3 Mar 2016 04:28:26 +0700 Subject: technical error on Java Language Spesification documentation Message-ID: Dear oracle, I read the documentation of java 8, which I downloaded the pdf from java official website. I've ran one example program on sub-chapter "1.2 Example Programs", and it was not producing the output "Hello, world" as mentioned on the e-book. I just want to do my best as a reader to give feedback for improvement purpose. Thank you. Sincerely, Lestari Ningratna Sari From alex.buckley at oracle.com Fri Mar 4 22:22:10 2016 From: alex.buckley at oracle.com (Alex Buckley) Date: Fri, 04 Mar 2016 14:22:10 -0800 Subject: Possible error in the Java Language Specifications In-Reply-To: <4106871456147957@web15j.yandex.ru> References: <4106871456147957@web15j.yandex.ru> Message-ID: <56DA0A92.3050506@oracle.com> There is no error in the JLS. There is no cast in 'doubleNum = ShortNum' so casting conversion is not relevant; rather, assignment conversion is relevant. If there was a cast, then since doubleNum is a double not a Double, Table 5.5-A would be relevant rather than 5.5-B. Alex On 2/22/2016 5:32 AM, TechnoTux wrote: > Hi, > > in the java language SE 8 specification located at: http://docs.oracle.com/javase/specs/index.html > in chapter 5 "Conversions and Contexts", page 119: in the Table 5.5-B. Casting conversions to reference types > > according to the table numeric reference types (Byte Short Character Integer Long Float Double) don't have casting conversion allowed to primitive value types > now looking at the following code: > > Short ShortNum = 0; > double doubleNum = 0; > > doubleNum = ShortNum; > > we see that Short converted to double which is primitive .. > > > > > now if i may ask, if my point isn't correct and there is no error in the specifications and since i'm trying to get the OCA 8 certificate then please tell me what the Specification meant by no casting conversion allowed ...? > From alex.buckley at oracle.com Fri Mar 4 22:24:20 2016 From: alex.buckley at oracle.com (Alex Buckley) Date: Fri, 04 Mar 2016 14:24:20 -0800 Subject: technical error on Java Language Spesification documentation In-Reply-To: References: Message-ID: <56DA0B14.3050605@oracle.com> There is no error in the example program and commands in section 1.2. Alex On 3/2/2016 1:28 PM, Lestari N.S wrote: > Dear oracle, > > I read the documentation of java 8, which I downloaded the pdf from java > official website. I've ran one example program on sub-chapter "1.2 Example > Programs", and it was not producing the output "Hello, world" as mentioned > on the e-book. I just want to do my best as a reader to give feedback for > improvement purpose. Thank you. > > > Sincerely, > Lestari Ningratna Sari >