最近中文字幕完整版高清,宅男宅女精品国产av天堂,亚洲欧美日韩综合一区二区,最新色国产精品精品视频,中文字幕日韩欧美就去鲁

首頁 > 考試輔導(dǎo) > 計算機(jī)考試 > JAVA認(rèn)證 > JAVA認(rèn)證試題集錦 > JAVA題庫:格林模擬試題二(下)(4)

JAVA題庫:格林模擬試題二(下)(4)

question 40)which of the following statements are correct?

1) if multiple listeners are added to a component only events for the last listener added will be processed
2) if multiple listeners are added to a component the events will be processed for all but with no guarantee in the order
3) adding multiple listeners to a comnponent will cause a compile time error
4) you may remove as well add listeners to a component.

question 41)given the following code

class base{}
public class mycast extends base{
static boolean b1=false;
static int i = -1;
static double d = 10.1;
public static void main(string argv[]){
mycast m = new mycast();
base b = new base();
//here
}
}


which of the following, if inserted at the comment //here will allow the code to compile and run without error

1) b=m;
2) m=b;
3) d =i;
4) b1 =i;

question 42)which of the following statements about threading are true

1) you can only obtain a mutually exclusive lock on methods in a class that extends thread or implements runnable
2) you can obtain a mutually exclusive lock on any object
3) a thread can obtain a mutually exclusive lock on an object by calling a synchronized method on that object.
4) thread scheduling algorithms are platform dependent

question 43)your chief software designer has shown you a sketch of the new computer parts system she is about to create. at the top of the hierarchy is a class called computer and under this are two child classes. one is called linuxpc and one is called windowspc.

the main difference between the two is that one runs the linux operating system and the other runs the windows system (of course another difference is that one needs constant re-booting and the other runs reliably). under the windowspc are two sub classes one called server and one called workstation. how might you appraise your designers work?


1) give the goahead for further design using the current scheme
2) ask for a re-design of the hierarchy with changing the operating system to a field rather than class type
3) ask for the option of windowspc to be removed as it will soon be obsolete
4) change the hierarchy to remove the need for the superfluous computer class.