JAVA题库:格林模拟试题三(下)(9)Java认证考试

文章作者 100test 发表时间 2009:04:30 07:58:49
来源 100Test.Com百考试题网


question 58)

what will happen when you attempt to compile and run the following code.

public class pvf{



static boolean paddy.

public static void main(string argv[]){

        system.out.println(paddy).

        }



}

1) compile time error
2) compilation and output of false
3) compilation and output of true
4) compilation and output of null


question 59)

which of the following statements are true?

1) the x,y coordinates of an instance of mouseevent can be obtained using the getx() and gety() methods
2) the x,y coordinates of an instance of mouseevent can be obtained using the x and y integer fields
3) the time of a mouseevent can be extracted using the gettime() method
4) the time of a mouseevent can be extracted using the getwhen method


question 60)

given the following code 



import java.io.*.



public class ppvg{

public static void main(string argv[]){

        ppvg p = new ppvg().

        p.fliton().

        }

        public int fliton(){

        try{

                fileinputstream din = new fileinputstream("ppvg.java").

                din.read().

        }catch(ioexception ioe){

		system.out.println("flytwick").       

        	return 99.

        }finally{

        	system.out.println("fliton").

        	}

        return -1.

        }

        

}

assuming the file ppvg.java is available to be read which of the following statements are true if you try to compile and run the program?

1) the program will run and output only "flytwick"
2) the program will run and output only "fliton"
3) the program will run and output both "fliton" and "flytwick"
4) an error will occur at compile time because the method fliton attempts to return two values



相关文章


格林模拟试题三参考答案(2)Java认证考试
格林模拟试题三参考答案(1)Java认证考试
格林模拟试题二参考答案Java认证考试
格林模拟试题一参考答案Java认证考试
JAVA题库:格林模拟试题三(下)(9)Java认证考试
JAVA题库:格林模拟试题三(下)(7)Java认证考试
JAVA试题:JAVA面试题目整理Java认证考试
JAVA题库:JAVA面试题目整理Java认证考试
SCJP认证套题解析之二Java认证考试
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛