
问几题java面试题。。。。。。。
最好说明选择原因,谢谢。。---------------2、Howcanyouforcegarbagecollectionofanobject?A.Garbagecoll...
最好说明选择原因 ,谢谢。。
---------------
2、 How can you force garbage collection of an object?
A. Garbage collection cannot be forced
B. Call System.gc().
C. Call System.gc(), passing in a reference to the object to be garbage collected.
D. Call Runtime.gc().
E. Set all references to the object to new values(null, for example).
6、Which two statements are true for the class java.util.TreeSet? (Choose two)
A. The elements in the collection are ordered.
B. The collection is guaranteed to be immutable.
C. The elements in the collection are guaranteed to be unique.
D. The elements in the collection are accessed using a unique key.
E. The elements in the collection are guaranteed to be synchronized
1、Java Application的启动方法是() ,Applet的启动方法是 ()
2. 在下列关于关系的陈述中,错误的是()
A)表中任意两行的值不能相同
B)表中任意两列的值不能相同
C)行在表中的顺序无关紧要
D)列在表中的顺序无关紧要
3.关系数据库中,实现实体之间的联系是通过表与表之间的()
A)公共索引
B)公共存储
C)公共元组
D)公共属性 展开
---------------
2、 How can you force garbage collection of an object?
A. Garbage collection cannot be forced
B. Call System.gc().
C. Call System.gc(), passing in a reference to the object to be garbage collected.
D. Call Runtime.gc().
E. Set all references to the object to new values(null, for example).
6、Which two statements are true for the class java.util.TreeSet? (Choose two)
A. The elements in the collection are ordered.
B. The collection is guaranteed to be immutable.
C. The elements in the collection are guaranteed to be unique.
D. The elements in the collection are accessed using a unique key.
E. The elements in the collection are guaranteed to be synchronized
1、Java Application的启动方法是() ,Applet的启动方法是 ()
2. 在下列关于关系的陈述中,错误的是()
A)表中任意两行的值不能相同
B)表中任意两列的值不能相同
C)行在表中的顺序无关紧要
D)列在表中的顺序无关紧要
3.关系数据库中,实现实体之间的联系是通过表与表之间的()
A)公共索引
B)公共存储
C)公共元组
D)公共属性 展开
4个回答
展开全部
2、 How can you force garbage collection of an object? -- A
程序员无法决定垃圾回收的具体时机
6、Which two statements are true for the class java.util.TreeSet? -- A,C
TreeSet内元素是自动排序的,且元素不可重复
1、Java Application的启动方法是(java 类名) ,Applet的启动方法是 (appletview 类名)
2. 在下列关于关系的陈述中,错误的是(B)
3.关系数据库中,实现实体之间的联系是通过表与表之间的(D)
程序员无法决定垃圾回收的具体时机
6、Which two statements are true for the class java.util.TreeSet? -- A,C
TreeSet内元素是自动排序的,且元素不可重复
1、Java Application的启动方法是(java 类名) ,Applet的启动方法是 (appletview 类名)
2. 在下列关于关系的陈述中,错误的是(B)
3.关系数据库中,实现实体之间的联系是通过表与表之间的(D)
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
2、 如何强制回收一个对象。E:将所有指向这个对象的指针都指向其他的值,比如null。
像这样。 Object o = new Object(); 现在要让他垃圾收集器收集,你用 o = null;
然后再 调用 System.gc();
答案:E
6、 TreeSet 根据使用的不同的构造器进行不同的排序。实现了Set接口,元素是不可重复的。
此实现不是同步的
答案:AC
1、2、3、略
像这样。 Object o = new Object(); 现在要让他垃圾收集器收集,你用 o = null;
然后再 调用 System.gc();
答案:E
6、 TreeSet 根据使用的不同的构造器进行不同的排序。实现了Set接口,元素是不可重复的。
此实现不是同步的
答案:AC
1、2、3、略
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
垃圾回收机制是底层线程,他只能被提醒执行,但是否执行也不确定,应为他是不定时执行的。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
2、C,调用System.gc()方法可以强制进行垃圾收集
6、A D
1、java 类名 appletview 类名 (注意有空格)
2、B
3、D
6、A D
1、java 类名 appletview 类名 (注意有空格)
2、B
3、D
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询