package javaapplication54;
public class JavaApplication54 {
static int monkey = 8;
static int theArray[] = new int[1];
public static void main(String[] args) {
// i attempted two ways to try to set monkey to = theArray[0];
monkey = theArray[0];
theArray[0] = monkey;
//i tried to get the result 8;
System.out.println(theArray[0]);
}
}
我试图通过打印出 theArray[0] 来获得结果 8,但结果为零。
run:
0
BUILD SUCCESSFUL (total time: 0 seconds)