⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 err6.java

📁 this gcc-g++-3.3.1.tar.gz is a source file of gcc, you can learn more about gcc through this codes f
💻 JAVA
字号:
/*--------------------------------------------------------------------------*//* File name  : err6.java                                              *//*            :                                                             *//* Cause      : Array evaluation order                                      *//*            :                                                             *//* Message    : NG:[1]-->[4]                                                *//*            :                                                             *//* Note       : JLS 15.9 Array Creation Expressions (p315--)                *//*            :  p318 line3                                                 *//*            :[Each dimension expression is fully evaluated                *//*            : before any part of any dimension expression to its right.]  *//*--------------------------------------------------------------------------*/public class err6 {  public static void main(String[] args) {    int[] x = { 10, 11, 12, 1, 14 };    int[] y = { 1, 2, 3, 4, 5, 6 };    if ( x[(x=y)[2]] == 1 ) {      System.out.println("OK");    } else {      System.out.println("NG:[1]-->[" +x[(x=y)[2]]+ "]");    }  }}

⌨️ 快捷键说明

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