SCJP 6.0认证教战手册考题201-244.pdf

合集下载

技能认证输油工初级考试(习题卷21)

技能认证输油工初级考试(习题卷21)

技能认证输油工初级考试(习题卷21)第1部分:单项选择题,共57题,每题只有一个正确答案,多选或少选均不得分。

1.[单选题]AB005以确定被测对象值为目的全部操作是()A)计量B)检定C)测量D)量答案:C解析:2.[单选题]BE002下列材料不可以用钳子剪切的是()。

A)金属丝B)刺铁丝C)硬质合金钢D)电线答案:C解析:3.[单选题]BC003根据输油站单体或总体工艺流程图的(),选择图纸标准幅面及尺寸,应优先采用规定的基本幅面及尺寸,准备好图纸。

A)复杂程度B)走向C)布置D)规划答案:A解析:4.[单选题]BE001钳子按()分类,可分为钢丝钳、尖嘴钳、扁嘴钳、断线钳和挡圈钳等。

A)规格B)用途C)绝缘性D)形状答案:B解析:5.[单选题]BF015流量计按测量原理可分为()、容积式流量计和质量式流量计三类。

A)速度式流量计B)密度式流量计C)电磁式流量计D)靶式流量计答案:A解析:D)自燃点答案:A解析:7.[单选题]BF015腰轮流量计也称罗茨流量计,属于()流量计。

A)容积式B)速度式C)质量式D)脉冲式答案:A解析:8.[单选题]BA009离心泵的流量是指单位时间内所输送的流体()。

A)数量B)扬程C)密度D)功率答案:A解析:9.[单选题]AD010一条直径325mm、长10km的埋地热油管道,冬季每小时的热损失可达400x104kJ如果进行保温,热损失可减少()或更多。

A)四分之一B)三分之一C)一半D)一倍答案:C解析:10.[单选题]在阀门型号中,用拼音字母( )表示闸阀。

A)JB)HC)AD)Z答案:D解析:11.[单选题]BB022真空相变加热炉热效率高,可达()以上。

A)70%B)80%C)90%D)100%答案:C解析:12.[单选题]BC010在离心泵产生极少量汽蚀时,泵的性能会()。

解析:13.[单选题]属于自动动作的阀门是()。

A)截止阀B)止回阀C)旋塞阀D)闸板阀答案:B解析:14.[单选题]立式金属罐地基的土壤,要求地质情况均匀,密实性好,耐压力不小于( )。

2024年车辆总装厂上岗资格认定理论考试1

2024年车辆总装厂上岗资格认定理论考试1

2024年车辆总装厂上岗资格认定理论考试11.分总成及各种阀类零件上的()只有在装配、连接需要时才能去除。

A.外包装薄膜。

B.工艺堵。

(正确答案)C.螺堵。

2.车辆前轮进入双板链前,需在左右(前轮前方)塞上停车楔,防止车辆异常滑动对操作人员造成伤害()。

A.前轮前方。

(正确答案)B.前轮后方。

C.后轮前方。

3.拧紧成组螺栓、螺母、螺钉时,必须按照一定的()拧紧,做到分次、()、逐步拧紧。

否则会使螺栓松紧不一致,甚至使被联接件变形。

A.频次、对称。

B.顺序、有序。

C.顺序、对称。

(正确答案)4.力矩扳手必须经()且在有效期内使用,扳手上必须有()及工具编号,并登记备案。

A.检验、检验标记。

B.鉴定、检验标记。

(正确答案)C.检验、校验记录。

5.密封胶要求现装现涂,不允许跨工位涂胶,避免胶液混入杂质影响密封性能()。

A.对。

(正确答案)B.错。

6.装配过程使用的气扳机等工具,在没有防护的前提下可以临时放置在车架、燃油箱、储气筒等零部件表面()。

A.对。

B.错。

(正确答案)7.自锁螺母在紧固时需要装配平垫()。

A.对。

B.错。

(正确答案)8.粗牙螺栓在紧固时可以使用细牙螺母()。

A.对。

B.错。

(正确答案)9.一般在装配时,六角法兰螺杆搭配六角法兰螺母()。

A.对。

(正确答案)B.错。

10.橡胶件、塑料件的连接,有垫圈、垫片等缓冲件的碳钢件之间的连接属于综合连接形式()。

A.对。

B.错。

(正确答案)11.所有标准件的紧固方向均为顺时针()。

A.对。

B.错。

(正确答案)12.螺纹的牙距尺寸时恒定不便的()。

A.对。

B.错。

(正确答案)13.螺栓涂胶工艺要求均匀涂抹在使用位置的3-5扣处()。

A.对。

(正确答案)B.错。

14.球面螺母、锥形螺母都有左旋和右旋的共同性()。

A.对。

(正确答案)B.错。

15.螺纹联接件拧紧时应优先从螺栓端实施拧紧()。

A.对。

B.错。

(正确答案)16.在距离热源较近时,应该使用耐高温扎带()。

技能认证通信电源考试(习题卷1)

技能认证通信电源考试(习题卷1)

技能认证通信电源考试(习题卷1)第1部分:单项选择题,共112题,每题只有一个正确答案,多选或少选均不得分。

1.[单选题]10kV线路发生金属性短路故障时,一般是( )保护先动作。

A)过电流B)速断C)重合闸答案:B解析:2.[单选题]市电停电(无交流输入)时,双变换在线式UPS的( )部件停止工作。

A)逆变器B)整流器C)蓄电池答案:B解析:3.[单选题]采用插座一般只能控制( ) 及以下的用电设备A)0、5kWB)1kWC)2kW答案:C解析:4.[单选题]电流互感器属于( )。

A)测量电器B)保护电器C)限流电器答案:A解析:5.[单选题]柴油发电机是通过什么零件将雾状柴油喷入燃烧室的( )?A)输油泵B)喷油嘴C)喷油泵答案:B解析:6.[单选题]避雷器通常接于导线和地之间,与被保护设备( )A)串联B)并联C)串关结合答案:B解析:B)小C)基本相同答案:B解析:8.[单选题]油机发电机组,在2次启动时间需有间隔时间,目的是( )A)供油需要恢复时间B)启动电池需要恢复时间C)防止金属间的磨损答案:B解析:9.[单选题]配电设备上的短路保护装置为( )。

A)继电器,B)分流器C)压敏电阴D)熔断器答案:D解析:10.[单选题]室内使用的固定机组,如果室温可以常年保证在0℃以上的,可常年使用( )号柴油、A)10B)0C)负10D)负20答案:B解析:11.[单选题]以下不属于非隔离型变换器的是( )。

A)正激式变换电路B)升压式变换电路C)降压式变换电路D)反相式变换电路答案:A解析:12.[单选题]高铁通信设备对电源要求相当高、输入功率也相当大,大量采用了“ ”UPS。

A)三端口式B)后备式C)在线式D)冗余式答案:C解析:8.高铁通信设备对电源要求相当高、输入功率也相当大,大量采用了在线式UPS。

13.[单选题]当UPS输出负载短路时,UPS应“ ”,并发出声光告警。

A)自动关断输出B)转自动旁路输出C)转蓄电池运行14.[单选题]交流三相五线制引入电源线A、B、C相颜色分别为“ ”、绿色、红色和黑色或天蓝色零线以及黄绿相交色的保护地线PE。

SCJP认证试题及答案

SCJP认证试题及答案

转载对题目和答案谨做参考Q1A method is ...1) an implementation of an abstraction.2) an attribute defining the property of a particular abstraction.3) a category of objects.4) an operation defining the behavior for a particular abstraction.5) a blueprint for making operations.Q2An object is ...1) what classes are instantiated from.2) an instance of a class.3) a blueprint for creating concrete realization of abstractions.4) a reference to an attribute.5) a variable.Q3Which line contains a constructor in this class definition?public class Counter { // (1)int current, step;public Counter(int startValue, int stepValue) { // (2)set(startValue);setStepValue(stepValue);}public int get() { return current; } // (3)public void set(int value) { current = value; } // (4)public void setStepValue(int stepValue) { step = stepValue; } // (5) }1) Code marked with (1) is a constructor2) Code marked with (2) is a constructor3) Code marked with (3) is a constructor4) Code marked with (4) is a constructor5) Code marked with (5) is a ConstructorQ4Given that Thing is a class, how many objects and reference variables are created by the following code?Thing item, stuff;item = new Thing();Thing entity = new Thing();1) One object is created2) Two objects are created3) Three objects are created4) One reference variable is created5) Two reference variables are created6) Three reference variables are created.Q5An instance member…1) is also called a static member2) is always a variable3) is never a method4) belongs to a single instance, not to the class as a whole5) always represents an operationQ6How do objects pass messages in Java?1) They pass messages by modifying each other's member variables2) They pass messages by modifying the static member variables of each other's classes3) They pass messages by calling each other's instance member methods4) They pass messages by calling static member methods of each other's classes.Q7Given the following code, which statements are true?class A {int value1;}class B extends A {int value2;}1) Class A extends class B.2) Class B is the superclass of class A.3) Class A inherits from class B.4) Class B is a subclass of class A.5) Objects of class A have a member variable named value2.Q8If this source code is contained in a file called SmallProg.java, what command should be used to compile it using the JDK?public class SmallProg {public static void main(String args[]) { System.out.println("Good luck!"); }}1) java SmallProg2) avac SmallProg3) java SmallProg.java4) javac SmallProg.java5) java SmallProg mainQ9Given the following class, which statements can be inserted at position 1 without causing the code to fail compilation?public class Q6db8 {int a;int b = 0;static int c;public void m() {int d;int e = 0;// Position 1}}1) a++;2) b++;3) c++;4) d++;5) e++;Q10Which statements are true concerning the effect of the >> and >>> operators?1) For non-negative values of the left operand, the >> and >>> operators will have the same effect.2) The result of (-1 >> 1) is 0.3) The result of (-1 >>> 1) is -1.4) The value returned by >>> will never be negative as long as the value of the right operand is equal to or greater than 1.5) When using the >> operator, the leftmost bit of the bit representation of the resulting value will always be the same bit value as the leftmost bit of the bit representation of the left operand.Q11What is wrong with the following code?class MyException extends Exception {}public class Qb4ab {public void foo() {try {bar();} finally {baz();} catch (MyException e) {}}public void bar() throws MyException {throw new MyException();}public void baz() throws RuntimeException {throw new RuntimeException();}}1) Since the method foo() does not catch the exception generated by the method baz(), it must declare the RuntimeException in its throws clause.2) A try block cannot be followed by both a catch and a finally block.3) An empty catch block is not allowed.4) A catch block cannot follow a finally block.5) A finally block must always follow one or more catch blocks.Q12What will be written to the standard output when the following program is run?public class Qd803 {public static void main(String args[]) {String word = "restructure";System.out.println(word.substring(2, 3));}}1) est2) es3) str4) st5) sQ13Given that a static method doIt() in a class Work represents work to be done, what block of code will succeed in starting a new thread that will do the work?CODE BLOCK A:Runnable r = new Runnable() { public void run() {Work.doIt();}};Thread t = new Thread(r);t.start();CODE BLOCK B:Thread t = new Thread() {public void start() {Work.doIt();}};t.start();CODE BLOCK C:Runnable r = new Runnable() { public void run() {Work.doIt();}};r.start();CODE BLOCK D:Thread t = new Thread(new Work()); t.start();CODE BLOCK E:Runnable t = new Runnable() { public void run() {Work.doIt();}};t.run();1) Code block A.2) Code block B.3) Code block C.4) Code block D.5) Code block E.Q14Write a line of code that declares a variable named layout of type LayoutManager and initializes it with a new object, which when used with a container can lay out components in a rectangular grid of equal-sized rectangles, 3 components wide and 2 components high.Q15public class Q275d {static int a;int b;public Q275d() {int c;c = a;a++;b += c;}public static void main(String args[]) {new Q275d();}}1) The code will fail to compile, since the constructor is trying to access static members.2) The code will fail to compile, since the constructor is trying to use static member variable a before it has been initialized.3) The code will fail to compile, since the constructor is trying to use member variable b before it has been initialized.4) The code will fail to compile, since the constructor is trying to use local variable c before it has been initialized.5) The code will compile and run without any problems.Q16What will be written to the standard output when the following program is run?public class Q63e3 {public static void main(String args[]) {System.out.println(9 ^ 2);}}1) 812) 73) 114) 05) falseQ17Which statements are true concerning the default layout manager for containers in the java.awt package?1) Objects instantiated from Panel do not have a default layout manager.2) Objects instantiated from Panel have FlowLayout as default layout manager.3) Objects instantiated from Applet have BorderLayout as default layout manager.4) Objects instantiated from Dialog have BorderLayout as default layout manager.5) Objects instantiated from Window have the same default layout manager as instances of Applet.Q18Which declarations will allow a class to be started as a standalone program?1) public void main(String args[])2) public void static main(String args[])3) public static main(String[] argv)4) final public static void main(String [] array)5) public static void main(String args[])Q19Under which circumstances will a thread stop?1) The method waitforId() in class MediaTracker is called.2) The run() method that the thread is executing ends.3) The call to the start() method of the Thread object returns.4) The suspend() method is called on the Thread object.5) The wait() method is called on the Thread object.Q20When creating a class that associates a set of keys with a set of values, which of these interfaces is most applicable?1) Collection2) Set3) SortedSet4) MapQ21What does the value returned by the method getID() found in class java.awt.AWTEvent uniquely identify?1) The particular event instance.2) The source of the event.3) The set of events that were triggered by the same action.4) The type of event.5) The type of component from which the event originated.Q22What will be written to the standard output when the following program is run?class Base {int i;Base() {add(1);}void add(int v) {i += v;}void print() {System.out.println(i);}}class Extension extends Base {Extension() {add(2);}void add(int v) {i += v*2;}}public class Qd073 {public static void main(String args[]) {bogo(new Extension());}static void bogo(Base b) {b.add(8);b.print();}}1) 92) 183) 204) 215) 22Q23Which lines of code are valid declarations of a native method when occurring within the declaration of the following class?public class Qf575 {// insert declaration of a native method here}1) native public void setTemperature(int kelvin);2) private native void setTemperature(int kelvin);3) protected int native getTemperature();4) public abstract native void setTemperature(int kelvin);5) native int setTemperature(int kelvin) {}Q24How does the weighty property of the GridBagConstraints objects used in grid bag layout affect the layout of the components?1) It affects which grid cell the components end up in.2) It affects how the extra vertical space is distributed.3) It affects the alignment of each component.4) It affects whether the components completely fill their allotted display area vertically.Q25Which statements can be inserted at the indicated position in the following code to make the program write 1 on the standard output when run?public class Q4a39 {int a = 1;int b = 1;int c = 1;class Inner {int a = 2;int get() {int c = 3;// insert statement herereturn c;}}Q4a39() {Inner i = new Inner();System.out.println(i.get());}public static void main(String args[]) {new Q4a39();}}1) c = b;2) c = this.a;3) c = this.b;4) c = Q4a39.this.a;5) c = c;Q26Which is the earliest line in the following code after which the object created on the line marked (0) will be a candidate for being garbage collected, assuming no compiler optimizations are done?public class Q76a9 {static String f() {String a = "hello";String b = "bye"; // (0)String c = b + "!"; // (1)String d = b;b = a; // (2)d = a; // (3)return c; // (4)}public static void main(String args[]) {String msg = f();System.out.println(msg); // (5)}}1) The line marked (1).2) The line marked (2).3) The line marked (3).4) The line marked (4).5) The line marked (5).Q27Which methods from the String and StringBuffer classes modify the object on which they are called?1) The charAt() method of the String class.2) The toUpperCase() method of the String class.3) The replace() method of the String class.4) The reverse() method of the StringBuffer class.5) The length() method of the StringBuffer class.Q28Which statements, when inserted at the indicated position in the following code, will cause a runtime exception when attempting to run the program?class A {}class B extends A {}class C extends A {}public class Q3ae4 {public static void main(String args[]) {A x = new A();B y = new B();C z = new C();// insert statement here}}1) x = y;2) z = x;3) y = (B) x;4) z = (C) y;5) y = (A) y;Q29Which of these are keywords in Java?1) default2) NULL3) String4) throws5) longQ30It is desirable that a certain method within a certain class can only be accessed by classes that are defined within the same package as the class of the method. How can such restrictions be enforced?1) Mark the method with the keyword public.2) Mark the method with the keyword protected.3) Mark the method with the keyword private.4) Mark the method with the keyword package.5) Do not mark the method with any accessibility modifiers.Q31Which code fragments will succeed in initializing a two-dimensional array named tab with a size that will cause the expression tab[3][2] to access a valid element?CODE FRAGMENT A:int[][] tab = {{ 0, 0, 0 },{ 0, 0, 0 }};CODE FRAGMENT B:int tab[][] = new int[4][];for (int i=0; iCODE FRAGMENT C:int tab[][] = {0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0,0, 0, 0, 0};CODE FRAGMENT D:int tab[3][2];CODE FRAGMENT E:int[] tab[] = { {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} };1) Code fragment A.2) Code fragment B.3) Code fragment C.4) Code fragment D.5) Code fragment E.Q32What will be the result of attempting to run the following program?public class Qaa75 {public static void main(String args[]) {String[][][] arr = {{ {}, null },{ { "1", "2" }, { "1", null, "3" } },{},{ { "1", null } }};System.out.println(arr.length + arr[1][2].length);}}1) The program will terminate with an ArrayIndexOutOfBoundsException.2) The program will terminate with a NullPointerException.3) 4 will be written to standard output.4) 6 will be written to standard output.5) 7 will be written to standard output.Q33Which expressions will evaluate to true if preceded by the following code? String a = "hello";String b = new String(a);String c = a;char[] d = { 'h', 'e', 'l', 'l', 'o' };1) (a == "Hello")2) (a == b)3) (a == c)4) a.equals(b)5) a.equals(d)Q34Which statements concerning the following code are true?class A {public A() {}public A(int i) { this(); }}class B extends A {public boolean B(String msg) { return false; }}class C extends B {private C() { super(); }public C(String msg) { this(); }public C(int i) {}}1) The code will fail to compile.2) The constructor in A that takes an int as an argument will never be called as a result of constructing an object of class B or C.3) Class C has three constructors.4) Objects of class B cannot be constructed.5) At most one of the constructors of each class is called as a result of constructing an object of class C.Q35Given two collection objects referenced by col1 and col2, which of these statements are true?1) The operation col1.retainAll(col2) will not modify the col1 object.2) The operation col1.removeAll(col2) will not modify the col2 object.3) The operation col1.addAll(col2) will return a new collection object,containing elements from both col1 and col2.4) The operation col1.containsAll(Col2) will not modify the col1 object.Q36Which statements concerning the relationships between the following classes are true?class Foo {int num;Baz comp = new Baz();}class Bar {boolean flag;}class Baz extends Foo {Bar thing = new Bar();double limit;}1) A Bar is a Baz.2) A Foo has a Bar.3) A Baz is a Foo.4) A Foo is a Baz.5) A Baz has a Bar.Q37Which statements concerning the value of a member variable are true, when no explicit assignments have been made?1) The value of an int is undetermined.2) The value of all numeric types is zero.3) The compiler may issue an error if the variable is used before it is initialized.4) The value of a String variable is "" (empty string).5) The value of all object variables is null.Q38Which statements describe guaranteed behavior of the garbage collection and finalization mechanisms?1) Objects are deleted when they can no longer be accessed through any reference.2) The finalize() method will eventually be called on every object.3) The finalize() method will never be called more than once on an object.4) An object will not be garbage collected as long as it is possible for an active part of the program to access it through a reference.5) The garbage collector will use a mark and sweep algorithm.Q39Which code fragments will succeed in printing the last argument given on the command line to the standard output, and exit gracefully with no output if no arguments are given?CODE FRAGMENT A:public static void main(String args[]) {if (args.length != 0)System.out.println(args[args.length-1]);}CODE FRAGMENT B:public static void main(String args[]) {try { System.out.println(args[args.length]); }catch (ArrayIndexOutOfBoundsException e) {}}CODE FRAGMENT C:public static void main(String args[]) {int ix = args.length;String last = args[ix];if (ix != 0) System.out.println(last);}CODE FRAGMENT D:public static void main(String args[]) {int ix = args.length-1;if (ix > 0) System.out.println(args[ix]);}CODE FRAGMENT E:public static void main(String args[]) {try { System.out.println(args[args.length-1]); }catch (NullPointerException e) {}}1) Code fragment A.2) Code fragment B.3) Code fragment C.4) Code fragment D.5) Code fragment E.Q40Which of these statements concerning the collection interfaces are true?1) Set extends Collection.2) All methods defined in Set are also defined in Collection.3) List extends Collection.4) All methods defined in List are also defined in Collection.5) Map extends Collection.Q41What is the name of the method that threads can use to pause their execution until signalled to continue by another thread?Fill in the name of the method (do not include a parameter list).Q42Given the following class definitions, which expression identifies whether the object referred to by obj was created by instantiating class B rather than classes A, C and D?class A {}class B extends A {}class C extends B {}class D extends A {}1) obj instanceof B2) obj instanceof A && ! (obj instanceof C)3) obj instanceof B && ! (obj instanceof C)4) obj instanceof C || obj instanceof D5) (obj instanceof A) && ! (obj instanceof C) && ! (obj instanceof D)Q43What will be written to the standard output when the following program is run?public class Q8499 {public static void main(String args[]) {double d = -2.9;int i = (int) d;i *= (int) Math.ceil(d);i *= (int) Math.abs(d);System.out.println(i);}}1) 122) 183) 84) 125) 27Q44What will be written to the standard output when the following program is run?public class Qcb90 {int a;int b;public void f() {a = 0;b = 0;int[] c = { 0 };g(b, c);System.out.println(a + " " + b + " " + c[0] + " ");}public void g(int b, int[] c) {a = 1;b = 1;c[0] = 1;}public static void main(String args[]) {Qcb90 obj = new Qcb90();obj.f();}}1) 0 0 02) 0 0 13) 0 1 04) 1 0 05) 1 0 1Q45Which statements concerning the effect of the statement gfx.drawRect(5, 5, 10, 10) are true, given that gfx is a reference to a valid Graphics object?1) The rectangle drawn will have a total width of 5 pixels.2) The rectangle drawn will have a total height of 6 pixels.3) The rectangle drawn will have a total width of 10 pixels.4) The rectangle drawn will have a total height of 11 pixels.Q46Given the following code, which code fragments, when inserted at the indicated location, will succeed in making the program display a button spanning the whole window area?import java.awt.*;public class Q1e65 {public static void main(String args[]) {Window win = new Frame();Button but = new Button("button");// insert code fragment herewin.setSize(200, 200);win.setVisible(true);}}1) win.setLayout(new BorderLayout()); win.add(but);2) win.setLayout(new GridLayout(1, 1)); win.add(but);3) win.setLayout(new BorderLayout()); win.add(but, BorderLayout.CENTER);4) win.add(but);5) win.setLayout(new FlowLayout()); win.add(but);Q47Which method implementations will write the given string to a file named "file", using UTF8 encoding?IMPLEMENTATION A:public void write(String msg) throws IOException {FileWriter fw = new FileWriter(new File("file"));fw.write(msg);fw.close();}IMPLEMENTATION B:public void write(String msg) throws IOException {OutputStreamWriter osw =new OutputStreamWriter(new FileOutputStream("file"), "UTF8");osw.write(msg);osw.close();}IMPLEMENTATION C:public void write(String msg) throws IOException { FileWriter fw = new FileWriter(new File("file"));fw.setEncoding("UTF8");fw.write(msg);fw.close();}IMPLEMENTATION D:public void write(String msg) throws IOException { FilterWriter fw = FilterWriter(new FileWriter("file"), "UTF8"); fw.write(msg);fw.close();}IMPLEMENTATION E:public void write(String msg) throws IOException { OutputStreamWriter osw = new OutputStreamWriter(new OutputStream(new File("file")), "UTF8");osw.write(msg);osw.close();}1) Implementation A.2) Implementation B.3) Implementation C.4) Implementation D.5) Implementation E.Q48Which are valid identifiers?1) _class2) $value$3) zer@4) ¥ngstr5) 2muchuqQ49What will be the result of attempting to compile and run the following program?public class Q28fd {public static void main(String args[]) {int counter = 0;l1:for (int i=10; i<0; i--) {l2:int j = 0;while (j < 10) {if (j > i) break l2;if (i == j) {counter++;continue l1;}}counter--;}System.out.println(counter);}}1) The program will fail to compile.2) The program will not terminate normally.3) The program will write 10 to the standard output.4) The program will write 0 to the standard output.5) The program will write 9 to the standard output.Q50Given the following interface definition, which definitions are valid?interface I {void setValue(int val);int getValue();}DEFINITION A:(a) class A extends I {int value;void setValue(int val) { value = val; }int getValue() { return value; }}DEFINITION B:(b) interface B extends I {void increment();}DEFINITION C:(c) abstract class C implements I {int getValue() { return 0; }abstract void increment();}DEFINITION D:(d) interface D implements I {void increment();}DEFINITION E:(e) class E implements I {int value;public void setValue(int val) { value = val; } }1) Definition A.2) Definition B.3) Definition C.4) Definition D.5) Definition E.Q51Which statements concerning the methods notify() and notifyAll() are true?1) Instances of class Thread have a method called notify().2) A call to the method notify() will wake the thread that currently owns the monitor of the object.3) The method notify() is synchronized.4) The method notifyAll() is defined in class Thread.5) When there is more than one thread waiting to obtain the monitor of an object, there is no way to be sure which thread will be notified by the notify() method.Q52Which statements concerning the correlation between the inner and outer instances of non-static inner classes are true?1) Member variables of the outer instance are always accessible to inner instances, regardless of their accessibility modifiers.2) Member variables of the outer instance can never be referred to using only the variable name within the inner instance.3) More than one inner instance can be associated with the same outer instance.4) All variables from the outer instance that should be accessible in the inner instance must be declared final.5) A class that is declared final cannot have any inner classes.Q53What will be the result of attempting to compile and run the following code?public class Q6b0c {public static void main(String args[]) {int i = 4;float f = 4.3;double d = 1.8;int c = 0;if (i == f) c++;if (((int) (f + d)) == ((int) f + (int) d)) c += 2;System.out.println(c);}}1) The code will fail to compile.2) 0 will be written to the standard output.3) 1 will be written to the standard output.4) 2 will be written to the standard output.5) 3 will be written to the standard output.Q54Which operators will always evaluate all the operands?1) ||2) +3) &&4) ? :5) %Q55Which statements concerning the switch construct are true?1) All switch statements must have a default label.2) There must be exactly one label for each code segment in a switch statement.3) The keyword continue can never occur within the body of a switch statement.4) No case label may follow a default label within a single switch statement.5) A character literal can be used as a value for a case label.Q56Which modifiers and return types would be valid in the declaration of a working main() method for a Java standalone application?1) private2) final3) static4) int5) abstractQ57What will be the appearance of an applet with the following init() method?public void init() {add(new Button("hello"));}1) Nothing appears in the applet.2) A button will cover the whole area of the applet.3) A button will appear in the top left corner of the applet.4) A button will appear, centered in the top region of the applet.5) A button will appear in the center of the applet.Q58Which statements concerning the event model of the AWT are true?1) At most one listener of each type can be registered with a component.2) Mouse motion listeners can be registered on a List instance.3) There exists a class named ContainerEvent in package java.awt.event.4) There exists a class named MouseMotionEvent in package java.awt.event.5) There exists a class named ActionAdapter in package java.awt.event.Q59Which statements are true, given the code new FileOutputStream("data", true) for creating an object of class FileOutputStream?1) FileOutputStream has no constructors matching the given arguments.2) An IOExeception will be thrown if a file named "data" already exists.3) An IOExeception will be thrown if a file named "data" does not already exist.4) If a file named "data" exists, its contents will be reset and overwritten.5) If a file named "data" exists, output will be appended to its current contents.Q60Given the following code, write a line of code that, when inserted at the indicated location, will make theoverriding method in Extension invoke the overridden method in class Base on the current object.class Base {public void print() {System.out.println("base");}}class Extention extends Base {public void print() {System.out.println("extension");// insert line of implementation here}}public class Q294d {public static void main(String args[]) {Extention ext = new Extention();ext.print();}}Fill in a single line of implementation.Q61Given that file is a reference to a File object that represents a directory, which code fragments will succeed in obtaining a list of the entries in the directory?1) Vector filelist = ((Directory) file).getList();2) String[] filelist = file.directory();3) Enumeration filelist = file.contents();4) String[] filelist = file.list();5) Vector filelist = (new Directory(file)).files();Q62What will be written to the standard output when the following program is run?。

技能认证配网自动化基础考试(习题卷24)

技能认证配网自动化基础考试(习题卷24)

技能认证配网自动化基础考试(习题卷24)第1部分:单项选择题,共44题,每题只有一个正确答案,多选或少选均不得分。

1.[单选题]SVG图形遵守的语法是( )A)XML语法B)VC语法C)Java语法D)txt文件答案:A解析:2.[单选题]采用绝缘手套法带电更换直线杆绝缘子,斗内电工操作绝缘小吊臂起吊导线脱离绝缘子,提升高度应不小于(),搭接导线遮蔽罩。

A)0.2mB)0.3mC)0.4mD)0.5m答案:C解析:3.[单选题]配电网的故障分为( )和小电流接地故障。

A)断线故障B)过压故障C)短路故障D)失压故障答案:C解析:4.[单选题]边设备应采用专用运维工具,安全防护要求包括但不限于:应采用基于( )和数字证书相结合的身份认证技术,实现对运维工具的身份认证。

A)加密认证B)用户名/强口令C)唯一标识D)动态口令答案:C解析:5.[单选题]按照国网公司“1135”新时代配电管理思路,要始终坚持以( )为主线。

A)确保电网安全B)提升供电可靠性C)提升优质服务水平D)提高电网运营效率答案:B解析:6.[单选题]在配电带电作业中,作业人员应避免( )。

A)接触横担B)接触拉线C)接触接地构件D)同时接触不同电位的物体答案:D解析:7.[单选题](中级工)测控单元是配电终端的()部分,主要完成信号的采集与计算、故障检测与故障信号记录、控制量输出、遥信、当地控制与分布式只能控制等功能。

A)核心组成B)必要组成C)主要组成D)基本组成答案:A解析:8.[单选题]若将DTU的电流A相二次线与N端(接地端)搭接在一起,会发生( )A)短路B)开路C)A相二次电流分流D)闪络答案:B解析:9.[单选题]站所终端(DTU)“三遥”站所终端功能具备就地采集至少()路开关的模拟量和状态量以及控制开关分合闸功能,具备测量数据、状态数据的远传和远方控制功能,可实现监控开关数量的灵活扩展。

A)2B)3C)4D)5答案:C解析:关联评价点的名称:维护与归档配电终端基础台账10.[单选题]配电终端与主站建立连接时间应小于()秒。

认证基础试题及答案

认证基础试题及答案

认证基础试题及答案一、单项选择题(每题2分,共10题)1. 认证过程中,以下哪项不是必要的步骤?A. 申请认证B. 审核资料C. 支付费用D. 发布广告答案:D2. 认证有效期通常为多久?A. 一年B. 三年C. 五年D. 十年答案:B3. 认证信息不包括以下哪项内容?A. 个人身份证明B. 学历证明C. 工作经验D. 个人爱好答案:D4. 在线认证系统通常不提供哪项服务?A. 进度查询B. 资料上传C. 考试预约D. 购买保险答案:D5. 认证考试通常包含哪些部分?A. 笔试和面试B. 笔试和实操C. 面试和实操D. 笔试、面试和实操答案:B6. 认证资料审核未通过的常见原因是什么?A. 资料不齐全B. 资料过期C. 资料不真实D. 以上都是答案:D7. 认证考试通过后,以下哪项不是必须完成的步骤?A. 领取证书B. 缴纳年费C. 参加培训D. 完成注册答案:C8. 认证信息更新通常需要提交哪些材料?A. 身份证复印件B. 学历证明C. 近期照片D. 以上都是答案:D9. 认证过程中,以下哪项不是必须缴纳的费用?A. 申请费B. 审核费C. 培训费D. 资料费答案:C10. 认证信息查询可以通过哪些方式进行?A. 官方网站B. 客服电话C. 邮件咨询D. 以上都是答案:D二、多项选择题(每题3分,共5题)1. 认证过程中可能需要提交的资料包括哪些?A. 身份证明B. 学历证明C. 工作经验证明D. 个人征信报告答案:ABC2. 认证考试的类型可能包括哪些?A. 笔试B. 面试C. 技能测试D. 心理测试答案:ABC3. 认证信息更新可能涉及哪些内容?A. 联系方式变更B. 学历更新C. 工作单位变更D. 认证级别升级答案:ABCD4. 认证过程中可能遇到的困难包括哪些?A. 资料准备不全B. 考试未通过C. 审核时间较长D. 认证费用较高答案:ABCD5. 认证信息查询的途径可能包括哪些?A. 官方网站查询B. 客服电话咨询C. 邮件反馈D. 现场咨询答案:ABCD三、判断题(每题1分,共5题)1. 认证过程中,所有资料必须为原件。

FSSC 22000V6

FSSC 22000V6

FSSC 22000V6.0 管理体系内审员考试试题1、FSSC第6版将有一个为期12个月的过渡窗口,允许各组织和认证机构准备实施并获得认证。

第6版的第一次审核将从()开始?[分值:5分}A、2024/1/1B、2025/1/1C、2024/4/1(正确答案)D、2025/4/12、FSSC第6版审核方案发生了部分变化,以下哪个说法不正确?()[分值:5分}A、前提方案引用的标准发生了变化(正确答案)B、附加要求的内容发生了变化C、对产品类别进行了调整D、对审核时间和不符合项整改的要求进行了调整3、FSSC第6版附加要求共有()个[分值:5分}A、17B、18(正确答案)C、19D、204、()应确保识别出所有原料、辅料和产品接触材料的适用法律法规要求[分值:5分}A、组织(正确答案)B、食品安全小组C、食品安全小组长D、最高管理者E、总经理5.PDCA循环的中文说法哪个正确()[分值:5分}A、策划-实施-检查-改善B、计划-执行-检查-改善C、策划-实施-检查-处置(正确答案)D、策划-实施-检查-改进6.食品安全危害不包括过敏原和放射性物质()[分值:5分}A、对B、错(正确答案)7.最高管理者应分派职责和权限以对质量管理体系的有效性承担责任()[分值:5分}A、对(正确答案)B、错8.《附件SL》的目的是为了缓解各种管理体系标准的不统一状况()[分值:5分}A、对(正确答案)B、错9.安全管理体系评审就是管理评审()[分值:5分}A、对B、错(正确答案)10.产品实现的支持过程不包括从外部供方获取的资源()[分值:5分}A、对B、错(正确答案)11.纠正可以包括在纠正措施中一起实施()[分值:5分}A、对(正确答案)B、错12.新标准中规定组织应策划应对风险和机遇的措施()[分值:5分}A、对(正确答案)B、错13.审核组长应能组织和指导审核、报告审核发现、评估纠正措施()[分值:5分}A、对(正确答案)B、错14.最高管理者应指导和支持全员为食品安全管理体系的有效性做出贡献,改进是制造部门的事,最高管理者可不参与()[分值:5分}A、对B、错(正确答案)15.“改进”的要求已经不是ISO22000:2018标准的一部分()[分值:5分}A、对B、错(正确答案)16、FSMS的原则包括以下哪些()多选[分值:5分}A、以顾客为关注焦点(正确答案)B、领导作用(正确答案)C、食品链相关方积极参与D、过程方法(正确答案)E、循证决策(正确答案)17、“污染”指在产品或加工环境中(A)或(B)的污染,包括食品安全危害多选题[分值:5分}A、引入(正确答案)B、产生(正确答案)C、人为添加D、增加18.通过考虑组织的()等因素,有助于对组织外部环境的理解多选[分值:5分}A、法律法规(正确答案)B、经济、技术、竞争、市场、文化、社会(正确答案)C、食品掺假、网络安全(正确答案)D、食品防护和蓄意污染(正确答案)19.最高管理者应确保组织内相关角色的职责、权限得到()多选[分值:5分}A、分配(正确答案)B、沟通(正确答案)C、任命D、理解(正确答案)20、为确保(),最高管理者应向下分配职责和权限多选[分值:5分}A、确保食品安全管理体系符合ISO22000标准要求(正确答案)B、了解食品安全管理体系的绩效(正确答案)C、任命食品安全小组和食品安全小组长(正确答案)D、指定人员职责和权限以启动和记录行动(正确答案)E、确保建立、实施、保持和更新食品安全管理体系。

铁路货运员技能竞赛考试学习手册

铁路货运员技能竞赛考试学习手册

铁路货运员技能竞赛考试学习手册一、装载加固1.使用镀锌铁线拉牵加固的方式主要有:八字形、倒八字形、交叉、又字形或反又字形等。

各种拉牵方式可单独使用,也可两种或两种以上组合使用。

拉牵应尽可能对称。

镀锌铁线使用注意事项:⑴拉牵用镀锌铁线直径不得小于4mm,捆绑用镀锌铁线直径不得小于2.6mm。

⑵镀锌铁线不得用作腰箍下压式加固,一般不用作整体捆绑。

⑶绞紧时不得损伤镀锌铁线。

⑷禁止使用两股以上镀锌铁线一次性缠绕的操作方法。

⑸禁止使用受损、使用过的镀锌铁线。

《常用装载加固材料及装置》第一章第一节2.条形草支垫使用注意事项:⑴禁止使用腐烂变质稻草或有伤痕、锈蚀的镀锌铁线制作的条形草支垫。

⑵避免集重装载时,条形草支垫在车地板上的铺垫位置应满足《加规》有关要求。

⑶严格控制货物装车时的温度,以防条形草支垫焦煳、燃烧造成失效。

《常用装载加固材料及装置》第二章第二节3.稻草垫使用方法:⑴稻草垫一般铺垫于货物与车地板间或货物层间用作防滑衬垫材料。

⑵铺垫稻草垫时,其露出货物边缘四周的裕量不得小于100mm(货物装载宽度与货车内宽接近时除外)。

稻草垫注意事项:⑴禁止使用腐烂变质稻草制作的稻草垫。

⑵严格控制货物装车时的温度,以防稻草垫焦煳、燃烧造成失效。

《常用装载加固材料及装置》第二章第四节4.《常用装载加固材料及装置》第五章第一节货物转向架每副两个,一个具有死心盘,中心销孔为一圆孔;另一个具有活心盘,中心销孔为一长孔。

每个转向架由上架体和下架体组成。

《常用装载加固材料及装置》第五章第一节5.货物装载加固的基本技术要求是:使货物均衡、稳定、合理地分布在货车上,不超载,不偏载,不偏重,不集重;能够经受正常调车作业以及列车运行中所产生各种力的作用,在运输全过程中,不发生移动、滚动、倾覆、倒塌或坠落等情况。

《铁路货物装载加固规则》第四条6.各装车单位应建立健全装车岗位责任制,坚持装车从严、发站从严的原则,严格按装载加固方案或相关技术要求装车。

技能认证设备技术员考试(习题卷4)

技能认证设备技术员考试(习题卷4)

技能认证设备技术员考试(习题卷4)第1部分:单项选择题,共45题,每题只有一个正确答案,多选或少选均不得分。

1.[单选题]在焊接过程中硫、磷的主要危害是产生()。

A)咬边B)裂纹C)夹渣答案:B解析:2.[单选题]装拆內六角螺钉时,使用的工具是( )。

A)套筒扳手B)內六角扳手C)锁紧扳手答案:B解析:3.[单选题]曲柄摇杆机构的死点发生在( )位置。

A)主动杆与摇杆共线B)主动杆与机架共线C)从动杆与连杆共线答案:C解析:4.[单选题]受迫振动系统在共振区消振最有效的措施使( )。

A)增大系统刚度B)增大系统阻尼C)增大系统质量答案:B解析:5.[单选题]对管束和壳体温差不大,壳程物料较干净的场合可选( )换热器A)浮头式B)固定管板式C)U型管式答案:B解析:6.[单选题]三角带传动是靠( )的磨擦力传递动力和运动的A)三角带的底面、侧面与轮槽侧面、底面B)三角带的底面与轮槽底面C)三角带的侧面与轮槽侧面答案:C解析:B)热胀冷缩的余地C)受力变形的余地D)装配误差的调整量答案:B解析:8.[单选题]剖分滑动轴承上、下轴瓦与轴承座盖装配时应使( )与座孔接触良好A)轴瓦B)轴径C)轴瓦背D)轴瓦面答案:C解析:9.[单选题]定轴轮系的总传动比等于各级传动比( )。

A)之和B)连乘积C)之差D)平方和答案:B解析:10.[单选题]22240CA/W33C3轴承型号中“W33”的含义为()。

A)内圈带润滑槽和三个润滑孔B)内圈带润滑槽和六个润滑孔C)外圈带润滑槽和三个润滑孔D)外圈带润滑槽和六个润滑孔答案:C解析:11.[单选题]齿轮箱内的润滑多数采用( )A)滴油润滑B)溅油或油池润滑C)内在润滑D)压力循环润滑答案:B解析:12.[单选题]对于离心压缩机的喘震,下列处理方法正确的是( )。

A)管小出口阀门B)降低出口压力C)减小流量D)增大流量答案:B解析:13.[单选题]阀门的壳体试验压力应为阀门在 20℃时最大允许工作压力的()倍。

2024年8月认证通用基础试题及参考答案

2024年8月认证通用基础试题及参考答案

2024年8月认证通用基础考试及参考答案一、单选题(每题1分,共30分)1、实施( )是合格评定机构保持认可资格的基本活动。

A、认可申请B、资源评估C、资质认定D、复评和监督【参考答案】D2、中国合格评定国家认可委员会依据( )的规定要求运作。

A、ISO/IEC 17011B、ISO/IEC 17065C、ISO/IEC 17021D、ISO/IEC 17024【参考答案】A3、审核员将现场看到、查到的证据对照标准和相关要求进行评价,开出了不符合报告,这是( )。

A、审核准则B、审核证据C、审核结论D、审核发现【参考答案】D4、合格评定工具箱中GB/T 27030《合格评定第三方符合性标志的通用要求》是( )。

A、基本文件B、技术功能文件C、通用文件D、操作规范文件【参考答案】C5、认证机构应建立、实施和保持一个文件化的且能够规范运作认证过程的( )。

A、管理方针B、管理方法C、管理体系D、管理政策【参考答案】C6、《认证机构管理办法》规定:认证机构从事认证活动应当遵循()的原则,维护社会信用体系。

A、诚实守信、风险管理B、公平公正、基于事实C、严谨性、系统性、科学性D、公正公开、客观独立、诚实信用【参考答案】D7、计量是国民经济的一项重要技术基础,计量是指实现( )、保证量值准确可靠的活动。

A、测量准确B、基准统一C、单位统一D、标准统一【参考答案】C8、合格评定工具箱中的国际标准已( )转化为我国的国家标准。

A、完全B、等效C、参照D、等同【参考答案】D9、GB/T 27021.1IDTISO/IEC 17021《合格评定管理体系审核认证机构的要求》属于合格评定工具箱中的( )类型文件。

A、技术功能文件B、规范性文件C、管理体系文件D、适用性文件【参考答案】A10、审核组依据认证任务书中规定的标准要求收集信息,进行评价并得出了结论,这是()。

A、认证结论B、审核证据C、审核结论D、审核发现【参考答案】C11、对合格评定规范性文件的要求,可分为( )层次。

施耐德低压电气考试考试题(题库版)

施耐德低压电气考试考试题(题库版)

施耐德低压电气考试考试题(题库版)1、问答题中性线过载保护(OSN)一般在什么场合使用?正确答案:对于4极断路器STR22SE/STR23SEOSN,应用于三次谐波含量较高的系统的保护中性线保护,在(江南博哥)4P4d位置,中性线保护调节旋钮可整定至1.6×Ir。

2、问答题如何实现断路器MT的通讯?如何接线?正确答案:用户可根据需求选择本体通讯模块和抽架通讯模块,它们分别反映了MT本体和抽架上的电气参数及状态量。

因此,固定式MT只能选择本体通讯模块,抽屉式MT可同时选择两种通讯模块或只选择本体通讯模块。

所有通讯模块必须提供直流24V工作电源。

只有本体通讯模块的接线:(1)从直流24V电源侧引出2根电源线,分别接到每台MT二次端子排上的E1(+)、E2(-);(2)对于4线通讯方式,从MT二次端子排上的E3A.、E4B.、E5(A’)、E6(B’)引出4芯屏蔽双绞线,分别接至另一台MT断路器二次端子排上的E3A.、E4B.、E5(A’)、E6(B’),依次连接,构成4线通讯总线(3)对于2线方式,只要在每台MT二次端子排上短接E3和E5、E4和E6,然后引出2芯屏蔽双绞线,依次连接,构成2线通讯总线。

本体通讯模块+抽架通讯模块的接线:(1)从外部直流24V电源侧引出2芯导线,接到一个抽架通讯模块上部的一对“+”“-”端子,再从其旁边的一对“+”“-”引出2芯导线,接到另一个抽架通讯模块上部的“+”“-”端子,依次连接所有抽架通讯模块。

(2)用两芯导线连接MT二次端子排上的E1(+)和E2(—)至抽架通讯模块下部的“+”“-”端子;(3)用4芯屏蔽双绞线连接MT二次端子排上的E3A.、E4B.、E5(A’)、E6(B’)至抽架通讯模块breaker侧的对应端子;(4)用导线连接MT二次端子排上的911、914、811、812、311、314至抽架通讯模块上的CT、CD、CE接点;(注:OF、SDE、CH、PF、XF、MX与本体通讯模块的连接,已在断路器内部完成,这里的OF、SDE、CH、PF是和本体通讯模块配套供应的专用附件,并不占用MT断路器标准配置的同类接点数量。

SCJP 6.0认证教战手册考题1

SCJP 6.0认证教战手册考题1
} public class Beta extends Alpha{
public void bar(int x){}
public int bar(String x){return 1;}
public void bar(int x, int y){} } 參考:6-5 繼承
第13題
Given: 1. 2.
參考:4-1 條件控制
4
SCJP 6.0 認證教戰手冊 黃彬華著 碁峰出版
第9題 Given:
11. String[] elements = {"for", "tea", "too"}; 12. String first = (elements.length>0) ? elements[0] : null; What is the result? A. Compilation fails. B. An exception is thrown at runtime. C. The variable first is set to null. D. The variable first is set to elements[0]. 答案:D 參考:4-1 條件控制、5-2 1 維陣列介紹
6
SCJP 6.0 認證教戰手冊 黃彬華著 碁峰出版
3.
new Barn.go("hi", 1);
4.
new Barn.go("hi", "world", 2);
5.
}
6.
public void go(String... y, int x){
7.
System.out.print(y[y.length-1] + " ");

单位内部认证输油工初级考试(试卷编号241)

单位内部认证输油工初级考试(试卷编号241)

单位内部认证输油工初级考试(试卷编号241)1.[单选题]BJ006发送清管器操作必须在()后方可进行。

A)经过调度批准同意B)下站倒好接收流程C)上站投好保护装置D)本站投入报警装置答案:B解析:2.[单选题]BM013为了使电荷达到足够的衰减,可在油流进罐或容器的最后30~50m左右的管段上采取()或是安装一个“衰减罐”(必须保持满罐),以使油品在进入油罐或容器之前使电荷衰减到安全值。

A)扩大管道直径B)减小管道直径C)安装节流阀D)安装偏心管答案:A解析:3.[单选题]AD013接零保护范围适用于()中性点直接接地的低压电力系统,如电气设备的金属外壳可采用接零保护。

A)二相二线制B)三相三线制C)三相四线制D)三相五线制答案:C解析:4.[单选题]BNO01泡沫灭火器装药()后,必须检查药液的发泡倍数和持久性等是否符合规定的技术要求,若不符合,应及时更换。

A)1年B)2年C)3年D)4年答案:A解析:5.[单选题]B0003放射型界面检测系统灵敏度高,能对混油段进行准确切割,但若长期在长输管道上C)居民D)建筑答案:C解析:6.[单选题]BD008一般每个输油站出站都设有调节阀,改变调节阀的开度可改变管道()。

A)输油量B)压力C)扬程D)温度答案:A解析:7.[单选题]BK006油品进入消气器内可使气体分离出来,当气体积聚较多,就迫使油界面下降,浮球也就下降,通过连杆带动排气阀杆先使小排气阀打开,排放一部分气体。

若气量少,油界面上升,则浮球(),可自动关闭排气阀,防止油品溢出。

A)上升B)下降C)倾斜D)偏转答案:A解析:8.[单选题]AE005在石油蒸气存在的环境下工作,如果感到恶心头痛,胸部有压迫感和疲倦,眼、鼻及咽喉的粘膜部分感到剧痛,口腔出现(),就可能是硫化氢中毒。

A)干燥B)裂口C)甜味D)金属味答案:D解析:9.[单选题]BM018脱毛衣时有静电,这是因为身穿的衣服之间经长时间的充分接触和摩擦而起电。

6号机组灰硫区域烟道外护板等治理外包人员安全技能认证考试(分场级)

6号机组灰硫区域烟道外护板等治理外包人员安全技能认证考试(分场级)

6号机组灰硫区域烟道外护板等治理外包人员安全技能认证考试(分场级)基本信息:姓名:外包单位:身份证号:考试时间:1 .钢丝绳或麻绳均须在通风良好、不潮湿的室内保管,要放置在架上或悬挂好。

A.正确.B.错误2 .起重作业指挥信号应明确、规范,禁止戴手套指挥。

A.正确.B.错误3 .禁止利用吊钩载人。

A.正确.B.错误4 . 起吊的重物,必须先用吊索(钢丝绳或铁链)很牢固和平稳地绑着,吊索(钢丝绳或铁链)不应有打结和扭劲的情况。

A.正确.B.错误5 .起重作业操作人员未接到指挥信号时不准操作。

A.正确.B.错误6 .滑车不准拴挂在未经计算的结构物上。

使用开门滑车,应将开门的钩环紧固,防止钢丝绳自动跑出。

A.正确.B.错误7 .起吊重物允许让其长期悬在空中。

A.正确.B.错误8 .与工作无关人员允许在起重作业区内行走或停留。

A.正确.B.错误9 .检修、消缺作业时应有防烫伤措施,严禁在设备安全附件、高温高压介质排放口、高温高压阀门法兰附近长时间停留。

A.正确.B.错误10 .使用撬杠时支点应可靠,并采取防止被撬物件倾倒、滚落的措施。

A.正确.B.错误11 .进入沟道或井下的工作人员须戴安全帽,使用安全带,且安全带的绳子应绑在地面牢固物体上,由监护人监视。

B.错误12 .移动式砂轮机磨削时产生的火花应向远离使用者方向。

A.正确.B.错误13 .角向磨光机的砂轮应选用增强纤维树脂型,其线速度不得小于80m/s。

A.正确.B.错误14 .不熟悉喷灯使用方法的人员不准擅自使用喷灯。

A.正确.B.错误15 .喷灯油筒内的油量不超过油筒容积的2/3。

A.正确.B.错误16 .如在检修期间需将栏杆拆除时,应装设安全警戒绳,并在检修结束时立即恢复。

A.正确.B.错误17 .使用角向磨光机磨削时,应使砂轮与工件保持15°~30°的倾斜位置;切削时,砂轮不得倾斜,不得横向摆动。

A.正确.18 .对于风动工具,可以用弯折风管的方法停止供气。

技能认证汽车焊装工初级考试(习题卷3)

技能认证汽车焊装工初级考试(习题卷3)

技能认证汽车焊装工初级考试(习题卷3)说明:答案和解析在试卷最后第1部分:单项选择题,共148题,每题只有一个正确答案,多选或少选均不得分。

1.[单选题]物体放在三个相互垂直的投影面中,使物体的主要平面平行于投影面,然后分别向三个投影面作正投影得到的三个图形称为( )。

A)主视图B)剖视图C)三视图2.[单选题]半机械半电子测量系统同时可以对( )个点进行测量。

A)1B)2C)353.[单选题]一般图纸的视图都是利用( )来绘制的。

A)立体图投影B)正投影C)侧投影4.[单选题]测量车门数据的过程中,要测量( )。

A)顶盖纵梁的中间位置B)门槛裙边的中间位置C)门锁的安装点5.[单选题]下面哪些元素可以减少钢的脆性( )。

A)CB)SC)Mn6.[单选题]用压缩空气进行清洁时,空气压力应为( )MPa以下。

A)0.8B)0.3C)0.57.[单选题]在车身的( )有安全气囊传感器。

A)前部和后部B)前部和中部C)中部和后部8.[单选题]频率为( )的交流电对人体的伤害最大,是最危险的频率。

C)30-500HZ9.[单选题]CO气体保护半自动焊时,采用短路引弧法,引弧前应把焊丝端部剪 去,防止产生( )。

A)未焊透B)飞溅C)夹渣10.[单选题]( )常用于件与件之间的间隙,零件与S面,检测面之间的间隙的检测。

A)塞尺B)游标卡尺C)间隙尺11.[单选题]下列哪些是气焊时的助燃气体( )A)C2H2B)CH4C)空气12.[单选题]等离子切割枪上最重要的部件是( )。

A)电极B)密封圈C)开关13.[单选题]车身防腐蚀用的薄体密封剂适用于宽度为( )mm以下接缝的密封。

A)5B)3C)414.[单选题]使用测量系统时应该( )。

A)全部的测量点都要测量B)对同一点要多次测量C)对安装点进行测量,其他可以不测15.[单选题]汽车覆盖件板料清洗的主要作用是( )A)清除板料表面粘上的异物B)使板料具有防锈作用C)减小磨具的磨损16.[单选题]校正前端严重碰撞的汽车时,要先校正( )。

技能认证客车检车员考试(习题卷12)

技能认证客车检车员考试(习题卷12)

技能认证客车检车员考试(习题卷12)说明:答案和解析在试卷最后第1部分:单项选择题,共42题,每题只有一个正确答案,多选或少选均不得分。

1.[单选题]《SW-160型转向架更换牵引拉杆指导书》要求新品统型实心牵引拉杆材质要求:Q235或( )A)20B)25C)2302.[单选题]钩尾框内装有( )和前、后从板,是传递牵引力的主要配件。

A)缓冲器B)车钩复原装置C)解钩装置D)车钩3.[单选题]( )型转向架中央悬挂装置中设有安全钢丝绳。

A)CW-200KB)SW-160C)SW- 200KD)209 HS4.[单选题]104型分配阀具有( )作用位置A)4B)5C)6D)75.[单选题]万用表置于“R×1k”挡,两表笔分别到二极管的两端,如果测得的电阻值( ),这时与黑表笔(即表内电池正极)相连接的是二极管正极;与红表笔(即表内电池负极)相连接的是二极管负极。

A)较大B)较小C)很大D)很小6.[单选题]列车运行时,母车发电机发出三相交流电经主整流器整流后变成直流电。

一路经控制箱 B+ 给蓄电池充电;另一路经控制箱( )线到配电盘主开关,给本车用电器供电。

A)JB)KC)LD)MC)2D)68.[单选题]下列不属于二系悬挂系统的是( )。

A)空气弹簧B)高度调整阀C)轴箱弹簧D)安全钢索9.[单选题]检修风缸时,其腐蚀深度超过( )时须更换。

A)0.3B)0.4C)0.5D)0.610.[单选题]客车车轮踏面剥离一处长度不得大于( )mm,剥离两处时每一处长度不大于( )mm。

A)30 20B)20 30C)30 25D)25 3011.[单选题]新型旅客列车设计成流线型并采用密封式车窗,是由于空气阻力与()成正比。

A)速度B)速度的2次方C)速度的3次方D)速度的4次方12.[单选题]密接钩分钩检查专项修,每()逐列实施一次。

A)1个月B)2个月C)6个月D)12个月13.[单选题]( )是指轮座与轴身的过渡圆弧部分。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

SCJP 6.0 認證教戰手冊黃彬華著碁峰出版書名:SCJP 6.0 認證教戰手冊作者:黃彬華完全擬真試題 201-244(共 244 題)第201題Given:1.import java.util.*;2.class A{}3.class B extends A{}4.public class Test{5.public static void main(Strang[] args){6.List<A> listA = new LinkedList<A>();7.List<B> listB = new LinkedList<B>();8.List<Obect> listO = new LinkedList<Obect>();9.//insert code here10.}11.public static void m1(List<? extends A> list){}12.public static void m2(List<A> list){}Place a result onto each method call to indicate what would happen if the method call were inserted at line 9. Note: Results can be used more than once.Method Calls Resultm1(listA); m2(listA); Does not compile.m1(listB); m2(listB); Compiles and runs without error.m1(listO); m2(listO); An exception is thrown atruntime.答案:m1(listA);Compiles and runs without error.m1(listB);Compiles and runs without error.m1(listO);Does not compile.m2(listA);Compiles and runs without error.m2(listB);Does not compile.m2(listO);Does not compile.參考:12-3 泛型第202題Given:NumberNames nn = new NumberNames();nn.put("one", 1);System.out.println(nn.getNames());Place the code into position to create a class that maps from Strings to integer values. The result of execution must be [one]. Some options may be used more than once.public class NumberNames{private HashMap< Place here , Place here > map =SCJP 6.0 認證教戰手冊黃彬華著碁峰出版public void put(String name, int value){map.put( Place here , Place here );}public Place here getNames(){return map.keySet();}}CodeSet<int> Set<Integer> HashSetSet<Integer, String> Set<int, String> Set<String, Integer>Set<String, int> Set<String> NumberNamesString Integer int >>() namevalue map答案:public class NumberNames{private HashMap< String , Integer > map =new HashMap< String , Integer>() ;public void put(String name, intvalue){ map.put( name , value );}public Set<String>getNames(){ returnmap.keySet();}}參考:12-5-1 HashMap第203題 Given:5.import java.util.*;6.public class SortOf{7.public static void main(String[] args){8.ArrayList<Integer> a = new ArrayList<Integer>();9. a.add(1); a.add(5); a.add(3);10.Collections.sort(a);11. a.add(2);12.Collections.reverse(a);13.System.out.println(a);14.}15.}What is the result?A.[1, 2, 3, 5]2D.[5, 3, 2, 1]E.[1, 3, 5, 2]pilation fails.G.An exception is thrown at runtime.答案:C參考:12-2-2 Collections 類別、12-4-5 List 集合第204題Given:11.public class Person{12.private name;13.public Person(String name){ = name;15.}16.public int hashCode(){17.return 420;18.}19.}Which statement is true?A.The time to find the value from HashMap with a Person key depends on the size of the map.B.Deleting a Person key from a HashMap will delete all map entries for all keys of type Person.C.Inserting a second Person object into a HashSet will cause the first Person object to be removed asa duplicate.D.The time to determine whether a Person object is contained in a HashSet is constant and does NOTdepend on the size of the map.答案:A參考:12-4-2 equals()、hashCode()方法的改寫第205題Given:12.import java.util.*;13.public class Explorer2{14.public static void main(String[] args){15.TreeSet<Integer> s = new TreeSet<Integer>();16.TreeSet<Integer> subs = new TreeSet<Integer>();17.for(int i=606; i<613; i++)18.if(i%2 == 0) s.add(i);19.subs = (TreeSet)s.subSet(608, true, 611, true);20.s.add(629);21.System.out.println(s + " " + subs);22.}23.}What is the result?pilation fails.B.An exception is thrown at runtime.C.[608, 610, 612, 629] [608, 610]D.[608, 610, 612, 629] [608, 610, 629]E.[606, 608, 610, 612, 629] [608, 610]F.[606, 608, 610, 612, 629] [608, 610, 629]答案:E參考:12-4-4 子集檢視第206題Given:1.public class Drink implements Comparable{2.public String name;3.public int compareTo(Object o){4.return 0;5.}6.}and:20.Drink one = new Drink();21.Drink two = new Drink(); = "Coffee"; = "Tea";24.TreeSet set = new TreeSet();25.set.add(one);26.set.add(two);A programmer iterates over the TreeSet and prints the name of each Drink object.What is the result?A.TeaB.CoffeeC.Coffee Teapilation fails.E.The code runs with no output.F.An exception is thrown at runtime.答案:B參考:12-4-3 SortedSet 集合第207題A programmer must create a generic class MinMax and the type parameter of MinMax must implement Comparable. Which implementation of MinMax will compile?A.class MinMax<E extendsComparable<E>>{ E min = null;E max = null;public MinMax(){}public void put(E value){/* store min or max */}B.class MinMax<E implementsComparable<E>>{ E min = null;E max = null;public MinMax(){}public void put(E value){/* store min or max */}C.class MinMax<E extendsComparable<E>>{ <E> E min = null;<E> E max = null;public MinMax(){}public <E> void put(E value){/* store min or max */}D.class MinMax<E implementsComparable<E>>{ <E> E min = null;<E> E max = null;public MinMax(){}public <E> void put(E value){/* store min or max */}答案:A參考:12-3 泛型第208題Given:1.import java.util.*;2.public class Example{3.public static void main(String[] args){4.//insert code here5.set.add(new Integer(2));6.set.add(new Integer(1)),7.System.out.println(set);8.}9.}Which code, inserted at line 4, guarantees that this program will output [1, 2]?A.Set set = new TreeSet();B.Set set = new HashSet();C.Set set = new SortedSet();D.List set = new SortedList();E.Set set = new LinkedHashSet();答案:A參考:12-4-3 SortedSet 集合第209題Given:1.import java.util.*;2.public class TestSet{3.enum Example{ONE, TWO, THREE}4.public static void main(String[] args){5.Collection coll = new ArrayList();6.coll.add(Example.THREE);7.coll.add(Example.THREE);8.coll.add(Example.THREE);9.coll.add(Example.TWO);10.coll.add(Example.TWO);11.coll.add(Example.ONE)12.Set set = new HashSet(coll);13.}14.}Which statement is true about the set variable on line 12?A.The set variable contains all six elements from the coll collection, and the order is guaranteed tobe preserved.B.The set variable contains only three elements from the coll collection, and the order is guaranteed tobe preserved.C.The set variable contains all six elements from the coll collection, but the order is NOT guaranteed tobe preserved.D.The set variable contains only three elements from the coll collection, but the order is NOTguaranteed to be preserved.答案:D參考:12-4-1 Set 集合、12-4-5 List 集合第210題Given:11.public class Person{12.private String name, comment;13.private int age;14.public Person(String n, int a, String c){ = n; age = a; comment = c;16.}17.public boolean equals(Object o){18.if (!(0 instanceof Person)) return false;19.Person p = (Person)o;20.return age == p.age && name.equals();21.}22.}What is the appropriate definition of the hashCode method in class Person?A.return super.hashCode();B.return name.hashcode() + age * 7;C.return name.hashCode() + comment.hashCode() / 2;D.return name.hashCode() + comment.hashCode() / 2- age * 3;答案:D參考:12-4-2 equals()、hashCode()方法的改寫第211題Given:11.public class Key{12.private long id1,13.private long id2;14.15.//class Key methods16.}A programmer is developing a class Key, that will be used as a key in a standard java.util.HashMap. Which two methods should be overridden to assure that Key works correctly as a key? (Choose two.)A.public int hashCode()B.public void hashCode()C.public int compareTo(Object o)D.public boolean equals(Object o)E.public boolean compareTo(Key k)答案:AD參考:12-4-2 equals()、hashCode()方法的改寫第212題Given:3.import java.util.*;4.public class Hancock{5.//insert code here6.list.add("foo");7.}8.}Which two code fragments, inserted independently at line 5, will compile without warnings? (Choose two.)A.public void addStrings(List list){B.public void addStrings(List<String> list){C.public void addStrings(List<? super String> list){D.public void addStrings(List<? extends String> list){答案:BC參考:12-4-2 equals()、hashCode()方法的改寫第213題Given a class whose instances, when found in a collection of objects, are sorted by using the compareTo() method, which two statements are true? (choose two.)A.The class implements parable.B.The class implements parator.C.The interface used to implement sorting allows this class to define only one sort sequence.D.The interface used to implement sorting allows this class to define many different sort sequences. 答案:AC參考:12-4-3 SortedSet 集合第214題Given:12.import java.util.*;13.public class Explorer3{14.public static void main(String[] args){15.TreeSet<Integer> s = new TreeSet<Integer>();16.TreeSet<Integer> subs = new TreeSet<Integer>();17.for(int i=606; i<613; i++)18.if(i%2 == 0) s.add(i);19.subs = (TreeSet)s.subSet(608, true, 611, true);20.subs.add(629);21.System.out.println(s + " " + subs);22.}23.}What is the result?pilation fails.B.An exception is thrown at runtime.C.[608, 610, 612, 629] [608, 610]D.[608, 610, 612, 629] [608, 610, 629]E.[606, 608, 610, 612, 629] [608, 610]F.[606, 608, 610, 612, 629] [608, 610, 629]答案:B參考:12-4-4 子集檢視第215題Given:1.import java.util.*;2.3.public class LetterASort{4.public static void main(String[] args){5.ArrayList<String> strings = new ArrayList<String>();6.strings.add("aAaA");7.strings.add("AaA");8.strings.add("aAa");9.strings.add("AAaa");10.Collections.sort(strings);11.for(String s : strings){System.out.print(s + " ");}12.}13.}What is the result?pilation fails.B.aAaA aAa AAaa AaAC.AAaa AaA aAa aAaAD.AaA AAaa aAaA aAaE.aAa AaA aAaA AAaaF.An exception is thrown at runtime.答案:C參考:12-2-2 Collections 類別、12-4-5 List 集合第216題Given:1.import java.util.*,2.public class TestGenericConversion{3.public static void main(String[] args){4.List list = new LinkedList();5.list.add("one");6.list.add("two");7.System.out.print(((String)list.get(O)).length());8.}9.}Refactor this class to use generics without changing the code's behavior.1. import java.util.*,2. public class TestGenericConversion{3. public static void main(String[] args){4. Place here5. list.add("one");6. list.add("two");7. Place here8. }9. }CodeList list = new LinkedList();System.out.print(list.get(0).length());List<String> list = new LinkedList<String>();System.out.print(list.get<String>(0).length()); List<String> list = new LinkedList(); System.out.print(<String>list.get(0).length());List list = new LinkedList<String>(); System.out.print((List<String>)list.get(0).length());1.import java.util.*,2.public class TestGenericConversion{3.public static void main(String[] args){4.List<String> list = new LinkedList<String>();5.list.add("one");6.list.add("two");7.System.out.print(list.get(0).length());8.}9.}參考:12-3 泛型SCJP 6.0 認證教戰手冊黃彬華著碁峰出版第217題Place the code into the GenericB class definition to make the class compile successfully.答案:參考:12-3 泛型10SCJP 6.0 認證教戰手冊黃彬華著碁峰出版第218題Place the code elements in position so that the Flags2 class will compile and make appropriate use of the wait/notify mechanism. Note You may reuse code elements.class Flags2{private boolean isReady = false;public Place here void produce(){isReady = true;Place here ;}public Place here voidconsume(){ while(!isReady){try{Placehere ; }catch(Exceptionex){}}isReady = Place here ;}}Code Elementssynchronizedtruefalsewait()volatilesynchronized()notifyAll()synchronize答案:class Flags2{private boolean isReady = false;public synchronized void produce(){isReady = true;notifyAll() ;}public synchronized voidconsume(){ while(!isReady){try{wait() ; }catch(Exception ex){}}isReady = false ;}}參考:13-5 執行緒的互動處理第219題 Given:1.public class Threads2 implements Runnable{114.System.out.println("run.");5.throw new RuntimeException("Problem");6.}7.public static void main(String[] args){8.Thread t = new Thread(new Threads2());9.t.start();10.System.out.println("End of method.");11.}12.}Which two can be results? (Choose two.)ng.RuntimeException: ProblemB.run.ng.RuntimeException: ProblemC.End of method.ng.RuntimeException: ProblemD.End of method.run.ng.RuntimeException: ProblemE.run.ng.RuntimeException: ProblemEnd of method.答案:DE參考:13-2 Java 執行緒與 Thread 類別第220題Which factor or factorsA.It is possible for more than two threads to deadlock at once.B.The JVM implementation guarantees that multiple threads cannot enter into a deadlocked state.C.Deadlocked threads release once their sleep() method's sleep duration has expired.D.Deadlocking can occur only when the wait(), notify() and notifyAll() methods are used incorrectly.E.It is possible for a single-threaded application to deadlock if synchronized blocks are used incorrectly.F.If a piece of code is capable of deadlocking, you cannot eliminate the possibility of deadlocking byinserting invocations of Thread.yield().答案:AF參考:13-5 執行緒的互動處理第221題Given:7.void waitForSignal(){8.Object obj = new Object();9.synchronized(Thread.currentThread()){10.obj.wait();11.obj.notify();12.}13.}Which statement is true?A.This code can throw an InterruptedException.B.This code can throw an IllegalMonitorStateException.C.This code can throw a TimeoutException after ten minutes.D.Reversing the order of obj.wait() and obj.notify() might cause this method to complete normally.E. A call to notify() or notifyAll() from another thread might cause this method to complete normally.F.This code does NOT compile unless "obj.wait()" is replaced with "((Thread) obj).wait()".答案:B參考:13-5 執行緒的互動處理第222題Given:10.public class Starter extends Thread{11.private int x = 2;12.public static void main(String[] args) throws Exception{13.new Starter().makeItSo();14.}15.public Starter(){16.x = 5;17.start();18.}19.public void makeItSo() throws Exception{20.join();21.x = x - 1;22.System.out.println(x);23.}24.public void run(){x *= 2;}25.}What is the output if the main() method is run?A. 4B. 5C.8D.9pilation fails.F.An exception is thrown at runhime.G.It is impossible to determine for certain.答案:D參考:13-2 Java 執行緒與 Thread 類別、13-3 Runnable 介面第223題Given:11.class PingPong2{12.synchronized void hit(long n){13.for(int i=1; i<3; i++)14.System.out.print(n + "-" + i + " ");15.}16.}17.public dass Tester implements Runnable{18.static PingPong2 pp2 = new PingPong2();19.public static void main(String[] args){20.new Thread(new Tester()).start();21.new Thread(new Tester()).start();22.}23.public void run(){pp2.hit(Thread.currentThread.getId());}24.}Which statement is true?A.The output could be 5-1 6-1 6-2 5-2B.The output could be 6-1 6-2 5-1 5-2C.The output could be 6-1 5-2 6-2 5-1D.The output could be 6-1 6-2 5-1 7-1答案:B參考:13-4 執行緒的同步性與安全性第224題Given:1.public class Threads4{2.public static void main(String[] args){3.new Threads4.go();4.}5.public void go(){6.Runnable r = new Runnable(){7.public void run(){8.System.out.print("foo");9.}10.};11.Thread t = new Thread(r);12.t.start();13.t.start();14.}15.}What is the result?pilation fails.B.An exception is thrown at runtime.C.The code executes normally and prints "foo";D.The code executes normally, but nothing is printed.答案:B參考:13-4 執行緒的同步性與安全性第225題Given:10.Runnable r = new Runnable(){11.public void run(){12.try{13.Thread.sleep(1000);14.}catch(InterruptedException e){15.System.out.println("interrupted");16.}17.System.out.println("ran");18.}19.};20.Thread t = new Thread(r);21.t.start();22.System.out.println("started");23.t.sleep(2000):24.System.out.println("interrupting");25.t.interrupt();26.System.out.println("ended");Assume that sleep(n) executes in exactly n milliseconds. and all other code executes in an insignificant amount of time.Place the fragments in the output area to show the result of running this code.答案:第226題Which two statements are true? (Choose two.)A. It is possible to synchronize static methods.15SCJP 6.0 認證教戰手冊黃彬華著碁峰出版B.When a thread has yielded as a result of yield(), it releases its locks.C.When a thread is sleeping as a result of sleep(), it releases its locks.D.The Object.wait() method can be invoked only from a synchronized context.E.The Thread.sleep() method can be invoked only from a synchronized context.F.When the thread scheduler receives a notify() request, and notifies a thread, that thread immediatelyreleases its lock.答案:AD參考:13-2 Java 執行緒與 Thread 類別、13-3 Runnable 介面、13-5 執行緒的互動處理第227題Given:1.public class TestOne implements Runnable{2.public static void main (String[] args)throws Exception{3.Thread t = new Thread(new TestOne());4.t.start();5.System.out.pririt("Started");6.t.join();7.System.out.print("Complete");8.}9.public void run(){10.for(int i=0; i<4; i++){11.System.out.print(i);12.}13.}14.}What can be a result?pilation fails.B.An exception is thrown at runtime.C.The code executes and prints "StartedComplete".D.The code executes and prints "StartedComplete0123".E.The code executes and prints "Started0123Complete".答案:E參考:13-2 Java 執行緒與 Thread 類別、13-3 Runnable 介面第228題Which three will compile and run without exception? (Choose three.)A.private synchronized Object o;B.void go(){synchronized(){/* code here */}C.public synchronized void go(){/* code here */}D.private synchronized(this) void go(){/* code here */}E.void go(){synchronized(Object.class){/* code here */}F.void go(){Object o = new Object();synchronized(o){/* code here */}答案:CEF參考:13-2 Java 執行緒與 Thread 類別、13-3 Runnable 介面、13-5 執行緒的互動處理第229題Given:1.public class TestFive{2.private int x;3.public void foo(){4.int current = x;5.x = current + 1;6.}7.public void go(){8.for(int i=0; i<5; i++){9.new Thread(){10.public void run(){11. foo();12. System.out.print(x + ", ");13.}}.start();14.}}Which two changes, taken together, would guarantee the output: 1, 2, 3, 4, 5, ? (Choose two.)A.move the line 12 print statement into the foo() methodB.change line 7 to public synchronized void go(){C.change the variable declaration on line 2 to private volatile int x;D.wrap the code inside the foo() method with a synchronized(this) blockE.wrap the for loop code inside the go() method with a synchronized block synchronized(this){//for loopcode here}答案:AD參考:8-5-4 匿名內部類別、13-2 Java 執行緒與 Thread 類別、13-3 Runnable 介面第230題Given that t1 is a reference to a live thread, which is true?A.The Thread.sleep() method can take t1 as an argument.B.The Object.notify() method can take t1 as an argument.C.The Thread.yield() method can take t1 as an argument.D.The Thread.setPriority() method can take t1 as an argument.E.The Object.notify() method arbitrarily chooses which thread to notify.答案:E參考:13-2 Java 執行緒與 Thread 類別、13-3 Runnable 介面、13-5 執行緒的互動處理第231題Given:11.Runnable r = new Runnable(){12.public void run(){13.System.out.print("Cat");14.}15.};16.Thread t = new Thread(r){17.public void run(){18.System.outprint("Dog");19.}20.};21.t.start();What is the result?A.CatB.Dogpilation fails.D.The code runs with no output.E.An exception is thrown at runtime.答案:B參考:8-5-4 匿名內部類別、13-2 Java 執行緒與 Thread 類別、13-3 Runnable 介面第232題Given:1.public class Threads5{2.public static void main(String[] args){3.new Thread(new Runnable(){4.public void run(){5.System.out.print("bar");6.}}).start();7.}8.}What is the result?pilation fails.B.An exception is thrown at runtime.C.The code executes normally and prints "bar".D.The code executes normally, but nothing prints.答案:C參考:8-5-4 匿名內部類別、13-2 Java 執行緒與 Thread 類別、13-3 Runnable 介面第233題Given:1.public class Threads1{2.int x = 0;3.public class Runner implements Runnable{4.public void run(){S.int current = 0;6.for(int i=0; i<4; i++){7.current = x;8.System.out.print(current + ", ");9.x = current + 2;10.}11.}12.}13.14.public static void main(String[] args){15.new Threads1().go();16.}17.18.public void go(){19.Runnable rl = new Runner();20.new Thread(r1).start();21.new Thread(r1).start();22.}23.}Which two are possible results? (Choose two.)A.0, 2, 4, 4, 6, 8, 10, 6,B.0, 2, 4, 6, 8, 10, 2, 4,C.0, 2, 4, 6, 8, 10, 12, 14,D.0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14,E.0, 2, 4, 6, 8, 10, 12, 14, 0, 2, 4, 6, 8, 10, 12, 14,答案:AC參考:8-5-4 匿名內部類別、13-2 Java 執行緒與 Thread 類別、13-3 Runnable 介面第234題Given:foo and bar are public references available to many other threads, foo refers to a Thread and bar is an Object. The thread foo is currently executing bar.wait().From another thread, what provides the most reliable way to ensure that foo will stop executing wait()?A.foo.notify();B.bar.notify();C.foo.notifyAll();D.Thread.notify();E.bar.notifyAll();F.Object.notify();答案:E參考:13-5 執行緒的互動處理第235題Given:11.public class PingPong implements Runnable{12.synchronized void hit(long n){13.for(int i=1; i<3; i++)14.System.out.print(n + "-" + i + " ");15.}16.public static void main(String[] args){17.new Thread(new PingPong()).start();18.new Thread(new PingPong()).start();19.}20.public void run(){21.hit(Thread.currentThread().getId);22.}23.}Which two statements are true? (Choose two.)A.The output could be 8-1 7-2 8-2 7-1B.The output could be 7-1 7-2 8-1 6-1C.The output could be 8-1 7-1 7-2 8-2D.The output could be 8-1 8-2 7-1 7-2答案:CD參考:13-4 執行緒的同步性與安全性第236題Given:1.class Computation extends Thread{2.3.private int num;4.private boolean isComplete;5.private int result;6.7.public Computation(int num){this.num = num;}8.9.public synchronized void run(){10.result = num * 2;11.isComplete = true;12.notify();13.}14.15.public synchronized int getResult(){16.while(!isComplete){17.try{18.wait();19.}catch(InterruptedException e){}20.}21.return result;22.}23.24.public static void main(String[] args){putation[] computations = new Computation[4];26.for(int i=0; i<computations.length; i++){putations[i] = new Computation(i);putations[i].start();29.}30.for(Computation c : computations)31.System.out.print(c.getResult() + " ");32.}33.}What is the result?A.The code will deadlock.B.The code may run with no output.C.An exception is thrown at runtime.D.The code may run with output "0 6".E.The code may run with output "2 0 6 4".F.The code may run with output "0 2 4 6".答案:F參考:13-4 執行緒的同步性與安全性第237題Place the code elements into the class so that the code compiles and prints "Run. Run. doIt. " in exactly that order. Note that there may be more than one correct solution.class TesTwo extends Thread{public static void main(String[] a) throwsException{ TesTwo t = new TesTwo();t.start();Place herePlace herePlace here}public voidrun(){ System.out.print("Run. ");}public voiddoIt(){ System.out.print("doIt. ");}}Code Elementst.start();t.join();t.pause(10);run();t.run();t.doIt(); doIt();答案:class TesTwo extends Thread{public static void main(String[] a) throws21SCJP 6.0 認證教戰手冊黃彬華著碁峰出版t.run();t.join();t.doIt();}public voidrun(){ System.out.print("Run. ");}public voiddoIt(){ System.out.print("doIt. ");}}參考:13-2 Java 執行緒與 Thread 類別第238題Which two code fragments will execute the method doStuff() in a separate thread? (Choose two.)A.new Thread(){public voidrun(){doStuff();} };B.new Thread(){public voidstart(){doStuff();} };C new Thread(){public voidstart(){doStuff();} }.run();D.new Thread(){public voidrun(){doStuff();} }.start();E.new Thread(newRunnable(){ public voidrun(){doStuff();} }).run();F.new Thread(newRunnable(){ public voidrun(){doStuff();}}).start();答案:DF參考:8-5-4 匿名內部類別、13-2 Java 執行緒與 Thread 類別、13-3 Runnable 介面第239題 Given:22SCJP 6.0 認證教戰手冊黃彬華著碁峰出版4.System.out.println("sleep");5.}6.}What is the result?pilation fails.B.An exception is thrown at runtime.C.The code executes normally and prints "sleep".D.The code executes normally, but nothing is printed.答案:C參考:13-2 Java 執行緒與 Thread 類別第240題Place a Class on each method that is declared in the class.參考:13-2 Java 執行緒與 Thread 類別、13-3 Runnable 介面、13-5 執行緒的互動處理第241題Given:1.public class Threads3 implements Runnable{2.public void run(){3.System.out.print("running");4.}5.public static void main(String[] args){6.Thread t = new Thread(new Threads3());7.t.run();11.}23What is the result?pilation fails.B.An exception is thrown at runtime.C.The code executes and prints "running".D.The code executes and prints "runningrunning".E.The code executes and prints "runningrunningrunning".答案:E參考:13-3 Runnable 介面第242題Given:public classNamedCounter{ privatefinal String name; privateint count;public NamedCounter(String name){ = name;}public String getName(){return name;}public void increment(){count++;}public int getCount(){return count;}public void reset(){count = 0;}Which three changes should be made to adapt this class to be used safely by multiple threads? (Choose three.)A.declare reset() using the synchronized keywordB.declare getName() using the synchronized keywordC.declare getCount() using the synchronized keywordD.declare the constructor using the synchronized keywordE.declare increment() using the synchronized keyword答案:ACE參考:13-3 Runnable 介面第243題Given that Triangle implements Runnable, and:31.void go() throws Exception{32.Thread t = new Thread(new Triangle());33.t.start();34.for(int x=1; x<100000; x++){35.//insert code here36.if(x%100 == 0) System.out.print("g");37.}}38.public void run(){39.try{40.for(int x=1; x<100000; x++){41.//insert the same code here42.if(x%100 == 0) System.out.print("t");43.}24。

相关文档
最新文档