单选题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) { 

题目
单选题
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);


相似考题
参考答案和解析
正确答案: E
解析: 暂无解析
更多“Given classes defined in two different files:  1. package ut”相关问题
  • 第1题:

    Which two statements are correct about database transportation?() 

    • A、 The source and target platforms must be the same
    • B、 Redo logs,control files and temp files are also transported
    • C、 The transported database must have the same database identifier (DBID) as the source database and cannot be changed
    • D、 The COMPATIBLE parameter must be set to 10.0.0.0 or higher and the database must be opened in readonly mode before being transported
    • E、 Recovery Manager (RMAN) is used to convert the necessary data files of the database if the target platform is different and has different endian format

    正确答案:D,E

  • 第2题:

    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

  • 第3题:

    User defined locale files can be stored in which two locations?()

    • A、DRAM
    • B、SDRAM
    • C、CME flash,slot0
    • D、CUE flash,slot0
    • E、TFTP directory specified by cnf-file location command

    正确答案:C,E

  • 第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 regarding a PL/SQL package body?()

    • A、It cannot be created without a package specification.
    • B、It cannot invoke subprograms defined in other packages.
    • C、It can contain only the subprograms defined in the package specification.
    • D、It can be changed and recompiled without making the package specification invalid.

    正确答案:A,D

  • 第6题:

    单选题
    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.


    正确答案: D
    解析: 暂无解析

  • 第7题:

    单选题
    Given classes defined in two different files: 1.package util; 2.public class BitUtils{ 3.private static void process(byte[]b){} 4.} 1.package app; 2.public class SomeApp{ 3.public static void main(String[]args){ 4.byte[]bytes=newbyte[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

    app.BitUtils.process(bytes);

    D

    util.BitUtils.process(bytes);

    E

    importutil.BitUtils.*;process(bytes);

    F

    SomeApp cannot use the process method in BitUtils.


    正确答案: B
    解析: 暂无解析

  • 第8题:

    多选题
    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


    正确答案: E,C
    解析: 暂无解析

  • 第9题:

    单选题
    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


    正确答案: C
    解析: 一个类中定义的成员变量只能被同一包中的类访问。

  • 第10题:

    多选题
    Given that b and c refer to instances of wrapper classes, which two statements are true?()
    A

    b.equals(b) returns true.

    B

    b.equals(c) returns the same result as b == c.

    C

    b.eqials(c) can return false even if c.equals(b) returns true.

    D

    b.equals(c) throws an exception if b and c are different wrapper types.

    E

    b.equals(c) returns false if the type of wrapper objects being compared are different.


    正确答案: C,E
    解析: 暂无解析

  • 第11题:

    多选题
    User defined locale files can be stored in which two locations?()
    A

    DRAM

    B

    SDRAM

    C

    CME flash,slot0

    D

    CUE flash,slot0

    E

    TFTP directory specified by cnf-file location command


    正确答案: E,D
    解析: 暂无解析

  • 第12题:

    单选题
    Given classes defined in two different files: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);


    正确答案: A
    解析: 暂无解析

  • 第13题:

    Given a file GrizzlyBear.java:  1. package animals.mammals;  2.  3. public class GrizzlyBear extends Bear {  4. void hunt() {  5. Salmon s = findSalmon();  6. s.consume();  7. }  8. }  and another file, Salmon.java:  1. package animals.fish; 2.  3. public class Salmon extends Fish {  4. void consume() { /* do stuff */ }  5. }  Assume both classes are defined in the correct directories for theft packages, and that the Mammal class correctly defines the findSalmon() method. Which two changes allow this code to compile correctly?()

    • A、 add public to the start of line 4 in Salmon.java
    • B、 add public to the start of line 4 in GrizzlyBear.java
    • C、 add import animals.mammals.*; at line 2 in Salmon.java
    • D、 add import animals.fish.*; at line 2 in GrizzlyBear.java
    • E、 add import animals.fish.Salmon.*; at line 2 in GrizzlyBear.java
    • F、 add import animals.mammals.GrizzlyBear.*;at line 2 in Salmon.java

    正确答案:A,D

  • 第14题:

    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

  • 第15题:

    Given that b and c refer to instances of wrapper classes, which two statements are true?()

    • A、 b.equals(b) returns true.
    • B、 b.equals(c) returns the same result as b == c.
    • C、 b.eqials(c) can return false even if c.equals(b) returns true.
    • D、 b.equals(c) throws an exception if b and c are different wrapper types.
    • E、 b.equals(c) returns false if the type of wrapper objects being compared are different.

    正确答案:B,C

  • 第16题:

    In which two web application directories can dependent classes and libraries be located? ()

    • A、 /WEB-INF/lib as a JAR file
    • B、 /META-INF/lib as a JAR file
    • C、 /classes as compiled class files
    • D、 /WEB-INF/lib as compiled class files
    • E、 /WEB-INF/classes as compiled class files
    • F、 /META-INF/classes as compiled class files

    正确答案:A,E

  • 第17题:

    多选题
    Which two statements are correct about database transportation?() (Choose two.)
    A

    The source and target platforms must be the same

    B

    Redo logs, control files and temp files are also transported

    C

    The transported database must have the same database identifier (DBID) as the source database and cannot be changed

    D

    The COMPATIBLE parameter must be set to 10.0.0.0 or higher and the database must be opened in readonly mode before being transported

    E

    Recovery Manager (RMAN) is used to convert the necessary data files of the database if the target platform is different and has different endian format


    正确答案: A,D
    解析: 暂无解析

  • 第18题:

    单选题
    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);


    正确答案: E
    解析: 暂无解析

  • 第19题:

    单选题
    Given classes defined in two different files:  1. package util;  2. public class BitUtils {  3. private static void process(byte[] b) { }  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

     app.BitUtils.process(bytes);

    D

     util.BitUtils.process(bytes);

    E

     import util.BitUtils. *; process(bytes);

    F

     SomeApp cannot use the process method in BitUtils.


    正确答案: F
    解析: 暂无解析

  • 第20题:

    多选题
    Which two statements are true regarding a PL/SQL package body?()
    A

    It cannot be created without a package specification.

    B

    It cannot invoke subprograms defined in other packages.

    C

    It can contain only the subprograms defined in the package specification.

    D

    It can be changed and recompiled without making the package specification invalid.


    正确答案: D,B
    解析: 暂无解析

  • 第21题:

    多选题
    In which two web application directories can dependent classes and libraries be located? ()
    A

    /WEB-INF/lib as a JAR file

    B

    /META-INF/lib as a JAR file

    C

    /classes as compiled class files

    D

    /WEB-INF/lib as compiled class files

    E

    /WEB-INF/classes as compiled class files

    F

    /META-INF/classes as compiled class files


    正确答案: A,E
    解析: 暂无解析

  • 第22题:

    多选题
    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
    解析: 暂无解析

  • 第23题:

    单选题
    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


    正确答案: A
    解析: 暂无解析

  • 第24题:

    单选题
    Given classes defined in two different files: What is required at line 5 in class SomeApp to use the process method of BitUtils?()
    A

    process(bytes);

    B

    BitUtils.process(bytes);

    C

    app.BitUtils.process(bytes);

    D

    util.BitUtils.process(bytes);

    E

    import util.BitUtils.*; process(bytes);

    F

    SomeApp cannot use the process method in BitUtils.


    正确答案: A
    解析: 暂无解析