今天就要考试了

终于要考试了
可是这次考试真的是没有动力了
今天第一门,是“现代软件开发技术”
其实我感觉我要是不选这个课程照样能学不少东西的
既然选了
现在就好好看看好好考试吧
加油了
我是最棒的
今天开始考试
哈哈
阅读更多

马上就要试了,急问几个问题

07-05

1.the garbage collector can be invoked explicity using a Runtime object对不对?我们只能建议执行garbage colletion,而不能强制。这句话中得invoke是那种呢?高手给解释一下?rn原题如下:rnwhich of the following statements about java's garbage collection are ture?rn1)the garbage collector can be invoked explicity using a Runtime objectrn2)The finalize method is always called before an object is garbage collected.rn3)Any class that includes a finalize method should invoike tis superclass' finalize methodrn4)garbage colletion behavior is very pridictable.rn答案:1,2,3rnrn2.public class Incrnpublic static void main(String argv[])rn Inc inc = new Inc();rn int i =0;rn inc.fermin(i);rn i=i++;rn System.out.println(i);rn rn void fermin(int i)rn i++;rn rnrn答案:0rni=i++之后i=0我觉不理解,我想可能是这样:先解析表达式,然后完成side effact,最后再执行表达式。不知道对不对?rnrn3. For a class defined inside a method, what rule governs access to the variables of the enclosing method?rn1)The class can access any variablesrn2)The class can only access static variablesrn3)The class can only access traisient variablesrn4)The class can only access final variablesrn答案是4,不应该是2吗?rnrn4. Which of the following statements about threading are true?rn1)You can only obtain a mutually exclusive lock on methods in a class that extends Thread or implements runnablern2)You can obtain a mutually exclusive lock on any objectrn3)A thread can obtain a mutually exclusive lock on a snychronized method of an objectrn4)Thread scheduling algorithms are platform dependentrn答案是2,3,4rn选项3)的lock加在method上,这样对吗?我认为lock是加在object上吧rn

没有更多推荐了,返回首页