当前位置:SCJP程序员认证考试题库

问题:

[单选]

1. class Bar { } 
1. class Test { 
2. Bar doBar() { 
3. Bar b = new Bar(); 
4. return b; 
5. } 
6. public static void main (String args[]) { 
7. Test t = new Test(); 
8. Bar newBar = t.doBar(); 
9. System.out.println(“newBar”); 
10. newBar = new Bar(); 
11. System.out.println(“finishing”); 
12. } 
13. }
At what point is the Bar object, created on line 3, eligible for garbage collection?()  

A .  After line 8.
B .  After line 10.
C .  After line 4, when doBar() completes.
D .  After line 11, when main() completes.

关于硫化氢的性质,下列说法中不正确的是()。 比空气重。 可燃。 有臭鸡蛋气味。 难溶于水。 我完全明白,一个组织要实现它的目的,就必须有一个人去思考,去指挥,并且全面担负起责任来。但是被领导的人不应当受到强迫,他们必须有可能采选择自己的领袖。在我看来,强迫的专制制度很快就会腐化堕落。因为暴力所招引来的总是一些品德低劣的人,而且我相信,天才的暴君总是由无赖采继承,这是一条千古不易的规律。――节选自《我的世界观》为什么作者说“天才的暴君总是由无赖来继承的? 以下有哪个说法是错误的?() 主页是一个网站最重要的页面。 每一个页面需要有一个页面主题。 Page Title是一个页面重要的排名元素。 页面中图片所占比例越大越好。 简述婴儿大脑发育的特点。 It takes a lot of time and effort to develop and maintain a marketing campaign that resonates( 共鸣)with your potential clients. However, you should think more about how to develop amarketing campaign. After all, we’re always looking for ways to increase our competitiveness. Here are some marketing strategies for you to check out.  Partner(结伴)with allies. Marketing partnerships have many benefits to push a marketing campaign. For starters, when you stand side by side with someone else, you can  deliver better content. If you are at the top of your business, marketing partnerships are cheaper to maintain your success and expose your brand.  Embrace user-generated content. According to a survey of 839 millennia’s (千万富翁), they spend 5.4 hours a day communicating with their peers, about 30 percent of their total media time. Similarly, you can also make this by sharing personal stories and exchanging ideas with your customers. This is a good way of carrying out advertisement.  Help customers solve a problem. As perfectly stated on Hubs pot,“You”re in business because you provide solutions.”Some of the ways you can help customers solve a problem is by: creating how-to-content; offering exclusives that make their lives easier; listening to them or answering their questions; or creating APPs or tools.  Let customers interact. No matter the product or service you’re offering, your  customers want to interact with your company, or at least other customers. AMC, for example, created an online tool that allowed you to write down your imaginations. American Express connects small? business owners to each other and helpful resources through its open forum.This article mainly talks about .()  some marketing strategies。 your potential clients。 communicative skill。

1. class Bar { } 
1. class Test { 
2. Bar doBar() { 
3. Bar b = new Bar(); 
4. return b; 
5. } 
6. public static void main (String args[]) { 
7. Test t = new Test(); 
8. Bar newBar = t.doBar(); 
9. System.out.println(“newBar”); 
10. newBar = new Bar(); 
11. System.out.println(“finishing”); 
12. } 
13. }
At what point is the Bar object, created on line 3, eligible for garbage collection?()  

参考答案:

  参考解析

The correct answer is B. When a local object is returned, it is not yet available for garbage collection. For this reason, the object is only available for garbage collecting at line 10, where the only remaining reference to the object is replaced with an other object.

相关题目:

在线 客服