module 1 – getting started q1.what will happen when you compile and run the following code? (4) public class myclass{ static int i; public static void main(string argv[]){ system.out.println(i); } } 1) error variable i may not have been initialized 2) null 3) 1 4) 0 q2.which of the following will compile without error (2)(3) 1) import java.awt.*; package mypackage; class myclass {} 2) package mypackage; import java.awt.*; class myclass{} 3) /*this is a comment */
package mypackage; import java.awt.*; class myclass{}转贴于:Java认证考试_考试大