Java认证考试

Given classes defined in two different files:  1. package util;  2. public class BitUtils {  3. public static void process(byte[]) { /* more code here */ }  4. }  1. package app;  2. public class SomeApp {  3. public static void main(String[] args) {  4.

题目

Given classes defined in two different files:  1. package util;  2. public class BitUtils {  3. public static void process(byte[]) { /* more code here */ }  4. }  1. package app;  2. public class SomeApp {  3. public static void main(String[] args) {  4. byte[] bytes = new byte[256];  5. // insert code here  6. }  7. }  What is required at line 5 in class SomeApp to use the process method of BitUtils?() 

  • A、 process(bytes);
  • B、 BitUtils.process(bytes);
  • C、 util.BitUtils.process(bytes);
  • D、 SomeApp cannot use methods in BitUtils.
  • E、 import util.BitUtils.*; process(bytes);
参考答案和解析
正确答案:C
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Which of the listed classes of fire would most likely occur in the engine room of a vessel?

A.Classes A and B

B.Classes B and C

C.Classes C and D

D.Classes A and D


正确答案:B

第2题:

How are the commands a user is allowed to enter defined in JUNOS?()

  • A、Permissions are configured individually for each user.
  • B、Users are associated with user classes, and each class defines the permissions for entering commands.
  • C、There are four default classes with different permissions and you can only use these four.
  • D、Permissions are associated with each user ID

正确答案:B

第3题:

Given two different character sets (A and B), which of the following must be true for A to be considered a strict superset of B?()

A. A must contain all of the characters defined in B

B. A must be Unicode

C. The encoded values in A must match the encoded values in B for all characters defined in B

D. A must be a multibyte character set

E. The encoded values in A must match the encoded values in B for all numeric and alphabetic characters in B


参考答案:A, C

第4题:

It 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?()  

  • A、Mark the method with the keyword public.
  • B、Mark the method with the keyword protected.
  • C、Mark the method with the keyword private.
  • D、Mark the method with the keyword package.
  • E、Do not mark the method with any accessibility modifiers.

正确答案:E

第5题:

Which two statements are true of login classes?()

  • A、Users can be members of multiple login classes.
  • B、Login classes define authorization parameters for a user.
  • C、There are five system-defined login classes.
  • D、Login class permission flags can be overridden for certain commands.

正确答案:B,D

第6题:

Given two different character sets (A and B), which of the following must be true for A to be considered a strict superset of B?()

  • A、 A must contain all of the characters defined in B
  • B、 A must be Unicode
  • C、 The encoded values in A must match the encoded values in B for all characters defined in B 
  • D、 A must be a multibyte character set
  • E、 The encoded values in A must match the encoded values in B for all numeric and alphabetic character

正确答案:A,C

第7题:

A member variable defined in a class can be accessed only by the classes in the same package. Which modifier should be used to obtain the access control?()         

  • A、 private
  • B、 no modifier
  • C、 public
  • D、 protected

正确答案:B

第8题:

How many strict-high priority forwarding classes can be applied to a given interface on a non-IQ PIC?()

A.1

B.2

C.3

D.4


参考答案:A

第9题:

Overlay Transport Virtualization (OTV) join interface is used to source the OTV encapsulated traffic and send it to the Layer 3 domain of the data center network. Which statements are true about OTV join interface? ()

  • A、 Join interface is a Layer 3 entity, and with the Cisco NX-OS release 6.0, it can only be defined as a physical interface, physical subinterface, Layer 3 port channel, or Layer 3 port channel subinterface.
  • B、 A single join interface can be defined and associated with a given OTV overlay.
  • C、 Multiple overlays can also share the same join interface.
  • D、 Join interface can be a loopback interface.
  • E、 The join interface is a Layer 3 entity that can be defined as a physical interface but not as a logical one.

正确答案:A,B,C

第10题:

How many strict-high priority forwarding classes can be applied to a given interface?()

  • A、1
  • B、2
  • C、3
  • D、4

正确答案:A

更多相关问题