甲骨文笔试精华汇总
[10-10 21:21:19] 来源:http://www.77xue.com 笔试题目 阅读:8150次
概要:(provided by main) in GroupUser.changeGroup?Question Number 17 add the keyword synchronized before void in GroupUser.changeGroup add thekeyword synchronized before void in both Group.add and Group.reverse--public class Group {ArrayList contents;public Group() {lst = new java.util.ArrayList();www.77xue.com哦 };public void add(String s) {/* code to add something to contents here */};public void reverse() {/* code to reverse the contents here
甲骨文笔试精华汇总,标签:驾照笔试题目,腾讯笔试题目,http://www.77xue.com
(provided by main) in GroupUser.changeGroup?
Question Number 17 add the keyword synchronized before void in GroupUser.changeGroup add the
keyword synchronized before void in both Group.add and Group.reverse
--------------
public class Group {
ArrayList contents;
public Group() {
lst = new java.util.ArrayList();
www.77xue.com哦
};
public void add(String s) {
/* code to add something to contents here */
};
public void reverse() {
/* code to reverse the contents here */
};
}
public class GroupUser extends Thread {
Group group;
public GroupUser(Group g) {
group = g;
}
public void changeGroup() {
/* code that calls group.add() several times then group.reverse() */
}
public void run() {
for (int i = 0; i < 10; i++) changeGroup();
}
}
public static void main(String args[]) throws InterruptedException {
Group g = new Group();
new GroupUser(g).start();
new GroupUser(g).start();
new GroupUser(g).start();
}
Which of the following changes could you make to the code to prevent the three threads
started by main from interfering with each other’s use of the shared Group instance
(provided by main) in GroupUser.changeGroup?
Question Number 18
change the call to changeGroup in GroupUser.run to:synchronized(group) {
changeGroup();
}
change the call to changeGroup in GroupUser.run to:synchronized(this) {
changeGroup();
----------
Iterator list= new iterator()
list = vect1.iterator()
while(list.hasNext())
{
String element = (String)list.next();
System.out.print(element);
}
Iterator list= new iterator()
list = vect1.iterator()
while(vect1.hasNext())
{
String element = (String)vect1.next();
System.out.print(element);
}
Iterator list= vect1.iterator()
while(list. vect1.hasNext())
{
String element = (String)list. vect1.next();
System.out.print(element);
}
oracle 非技术类GT测试题
两大部分
第一部分Baseline IT Aptitude 40分钟 又可以细分为六个小部分 每个小部分单独计时每个小部分之间
可以take break
www.77xue.com哦
第二部分性格测试 155道选择题 不计时 外企的性格测试都差不多 不必多说按自己的实际情况填就好了
第一部分的六小部分如下:
数学:10分钟10道题 不同于SHL 不是图表计算 而是类似中学应用题一样的计算 但是是英文题干的 注意
可以适当的skip 因为这里skip并不代表放弃 做完后面的题后电脑会自动返回之前skip的题让你继续作答
Tag:笔试题目,驾照笔试题目,腾讯笔试题目,求职指南 - 求职笔试面试 - 笔试题目
- 上一篇:星展银行和浦发银行笔试题