You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Joseph W. Haller (Jira)" <ji...@apache.org> on 2021/01/23 19:02:00 UTC

[jira] [Updated] (NETBEANS-5283) Inconsistent System.out.println : "2B" does not print

     [ https://issues.apache.org/jira/browse/NETBEANS-5283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joseph W. Haller updated NETBEANS-5283:
---------------------------------------
    Description: 
The following problem was discovered accidentally by a student.

The following class with comments summarizes the incorrect behavior seen when calling System.out.println on certain strings beginning with numerical digits and ending in a single characters of either B, K, or M (upper or lower case):

{{public class Hello2B {}}
 {{   public static void main(String[] args) {}}
 {{     System.out.println("-2B"); // THIS WILL PRINT IN NETBEANS}}
 {{     System.out.println("2B"); // THIS WILL NOT PRINT IN NETBEANS}}
 {{     System.out.println("-2B"); // THIS WILL PRINT IN NETBEANS}}
 {{     System.out.println("5K"); // THIS WILL NOT PRINT IN NETBEANS}}
 {{     System.out.println("4M"); // THIS WILL NOT PRINT IN NETBEANS}}
 {{     System.out.println("123B"); // THIS WILL NOT PRINT IN NETBEANS}}
 {{     System.out.println("123BC");// THIS WILL PRINT IN NETBEANS}}
    }
 {{}}}

 

NOTE: Problem does not occur when class is executed by JDK directly or by using other IDE environments.

  was:
The following problem was discovered accidentally by a student.

The following class with comments summarizes the incorrect behavior seen when calling System.out.println on certain strings beginning with numerical digits and ending in a single characters of either B, K, or M (upper or lower case):

{{public class Hello2B {}}
{{   public static void main(String[] args) {}}
{{     System.out.println("-2B"); // THIS WILL PRINT IN NETBEANS}}
{{     System.out.println("2B"); // THIS WILL NOT PRINT IN NETBEANS}}
{{     System.out.println("-2B"); // THIS WILL PRINT IN NETBEANS}}
{{     System.out.println("5K"); // THIS WILL NOT PRINT IN NETBEANS}}
{{     System.out.println("4M"); // THIS WILL NOT PRINT IN NETBEANS}}
{{     System.out.println("123B"); // THIS WILL NOT PRINT IN NETBEANS}}
{{     System.out.println("123BC");// THIS WILL PRINT IN NETBEANS}}
{{   }}}
{{}}}

 

 


> Inconsistent System.out.println : "2B" does not print
> -----------------------------------------------------
>
>                 Key: NETBEANS-5283
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5283
>             Project: NetBeans
>          Issue Type: Bug
>          Components: platform - Output Window
>    Affects Versions: 11.3, 12.2
>         Environment: *Product Version:* Apache NetBeans IDE 12.2
> *Java:* 11.0.7; OpenJDK 64-Bit Server VM 11.0.7+10
> *Runtime:* OpenJDK Runtime Environment 11.0.7+10
> *System:* Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb)
>            Reporter: Joseph W. Haller
>            Priority: Major
>         Attachments: Hello2B.java, HelloWorld2B.java
>
>
> The following problem was discovered accidentally by a student.
> The following class with comments summarizes the incorrect behavior seen when calling System.out.println on certain strings beginning with numerical digits and ending in a single characters of either B, K, or M (upper or lower case):
> {{public class Hello2B {}}
>  {{   public static void main(String[] args) {}}
>  {{     System.out.println("-2B"); // THIS WILL PRINT IN NETBEANS}}
>  {{     System.out.println("2B"); // THIS WILL NOT PRINT IN NETBEANS}}
>  {{     System.out.println("-2B"); // THIS WILL PRINT IN NETBEANS}}
>  {{     System.out.println("5K"); // THIS WILL NOT PRINT IN NETBEANS}}
>  {{     System.out.println("4M"); // THIS WILL NOT PRINT IN NETBEANS}}
>  {{     System.out.println("123B"); // THIS WILL NOT PRINT IN NETBEANS}}
>  {{     System.out.println("123BC");// THIS WILL PRINT IN NETBEANS}}
>     }
>  {{}}}
>  
> NOTE: Problem does not occur when class is executed by JDK directly or by using other IDE environments.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists