单选题Which keyword can protect a class in a package from accessibility by the classes outside the package()。A privateB protectedC finalD don’t use any keyword at all (make it default)

题目
单选题
Which keyword can protect a class in a package from accessibility by the classes outside the package()。
A

private

B

protected

C

final

D

don’t use any keyword at all (make it default)


相似考题
更多“单选题Which keyword can protect a class in a package from accessibility by the classes outside the package()。A privateB protectedC finalD don’t use any keyword at all (make it default)”相关问题
  • 第1题:

    Which keyword can protect a class in a package from accessibility by the classes outside the package()。

    • A、private
    • B、protected
    • C、final
    • D、don’t use any keyword at all (make it default)

    正确答案:D

  • 第2题:

    package test; class Target{ public String name="hello"; } What can directly access and change the value of the variable name?()

    • A、any class
    • B、only the Target class
    • C、any class in the test package
    • D、any class that extends Target

    正确答案:C

  • 第3题:

    package foo; public class Outer (  public static class Inner (  )  )   Which statement is true? () 

    • A、 An instance of the Inner class can be constructed with “new Outer.Inner ()”
    • B、 An instance of the inner class cannot be constructed outside of package foo.
    • C、 An instance of the inner class can only be constructed from within the outer class.
    • D、 From within the package bar, an instance of the inner class can be constructed with “new inner()”

    正确答案:A

  • 第4题:

    Which keyword is used with the show ip bgp neighbors [keyword] command to display all routes that are received and accepted from a neighbor?()

    • A、paths
    • B、accepted-routes
    • C、advertised-routes
    • D、routes

    正确答案:D

  • 第5题:

    package geometry;  public class Hypotenuse {  public InnerTriangle it = new InnerTriangle();  class InnerTriangle {  public int base;  public int height;  }  }  Which is true about the class of an object that can reference the variable base? ()

    • A、 It can be any class.
    • B、 No class has access to base.
    • C、 The class must belong to the geometry package.
    • D、 The class must be a subclass of the class Hypotenuse.

    正确答案:C

  • 第6题:

    Which statements are true regarding the creation of an incident package file by using the EMWorkbench Support()

    • A、You can add SQL test cases to the incident package.
    • B、You can add or remove the trace files to the package.
    • C、You cannot create an incremental incident package when the physical files are purged from the ADR.
    • D、You can create the incremental incident package ZIP file for new or modified diagnostic information for the incident package already created.

    正确答案:A,B,D

  • 第7题:

    单选题
    package geometry;  public class Hypotenuse {  public InnerTriangle it = new InnerTriangle();  class InnerTriangle {  public int base;  public int height;  }  }  Which is true about the class of an object that can reference the variable base? ()
    A

     It can be any class.

    B

     No class has access to base.

    C

     The class must belong to the geometry package.

    D

     The class must be a subclass of the class Hypotenuse.


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

  • 第8题:

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


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

  • 第9题:

    多选题
    Which statements concerning the event model of the AWT are true?()
    A

    At most one listener of each type can be registered with a component.

    B

    Mouse motion listeners can be registered on a List instance.

    C

    There exists a class named ContainerEvent in package java.awt.event.

    D

    There exists a class named MouseMotionEvent in package java.awt.event.

    E

    There exists a class named ActionAdapter in package java.awt.event.


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

  • 第10题:

    单选题
    Which keyword can protect a class in a package from accessibility by the classes outside the package()。
    A

    private

    B

    protected

    C

    final

    D

    don’t use any keyword at all (make it default)


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

  • 第11题:

    单选题
    Which keyword is used with the show ip bgp neighbors [keyword] command to display all routes that are received and accepted from a neighbor?()
    A

    paths

    B

    accepted-routes

    C

    advertised-routes

    D

    routes


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

  • 第12题:

    单选题
    After applying a new ACL on a device, its CPU utilization rose significantly and many messages starting with "%SEC-6-IPACCESSLOG" appeared on the Syslog server. What can be done to resolve this situation?()
    A

    Increase memory allocation for ACLs.

    B

    Remove all entries from the ACL and use a single permit ip any any statement.

    C

    Remove the log keyword from each ACL entry.

    D

    Reboot the device after the ACL has been applied.


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

  • 第13题:

    package foo;  public class Outer {  public static class Inner {  }  }   Which statement is true?() 

    • A、 Compilation fails.
    • B、 An instance of the Inner class can be constructed with “new Outer.Inner()”.
    • C、 An instance of the Inner class cannot be constructed outside of package foo.
    • D、 An instance of the Inner class can be constructed only from within the Outer class.
    • E、 From within the package foo, and instance of the Inner class can be constructed with “new Inner()”.

    正确答案:B

  • 第14题:

    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

  • 第15题:

    构造型«access»表示()导入。

    • A、private
    • B、protected
    • C、public
    • D、package

    正确答案:A

  • 第16题:

    Which of the following file types can Microsoft servers package for remote installation by default?()

    • A、 .exe
    • B、 .ini
    • C、 .msi
    • D、 .dll

    正确答案:C

  • 第17题:

    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

  • 第18题:

    Which statements concerning the event model of the AWT are true?()  

    • A、At most one listener of each type can be registered with a component.
    • B、Mouse motion listeners can be registered on a List instance.
    • C、There exists a class named ContainerEvent in package java.awt.event.
    • D、There exists a class named MouseMotionEvent in package java.awt.event.
    • E、There exists a class named ActionAdapter in package java.awt.event.

    正确答案:B,C

  • 第19题:

    单选题
    package foo;  public class Outer {  public static class Inner {  }  }   Which statement is true?()
    A

     Compilation fails.

    B

     An instance of the Inner class can be constructed with “new Outer.Inner()”.

    C

     An instance of the Inner class cannot be constructed outside of package foo.

    D

     An instance of the Inner class can be constructed only from within the Outer class.

    E

     From within the package foo, and instance of the Inner class can be constructed with “new Inner()”.


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

  • 第20题:

    单选题
    Which of the following file types can Microsoft servers package for remote installation by default?()
    A

     .exe

    B

     .ini

    C

     .msi

    D

     .dll


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

  • 第21题:

    单选题
    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
    解析: 一个类中定义的成员变量只能被同一包中的类访问。

  • 第22题:

    单选题
    package foo; public class Outer (  public static class Inner (  )  )   Which statement is true? ()
    A

     An instance of the Inner class can be constructed with “new Outer.Inner ()”

    B

     An instance of the inner class cannot be constructed outside of package foo.

    C

     An instance of the inner class can only be constructed from within the outer class.

    D

     From within the package bar, an instance of the inner class can be constructed with “new inner()”


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

  • 第23题:

    单选题
    From the last paragraph, we can see that “a blanket podcasting license” is one that .
    A

    offers protection to a podcasting license

    B

    gives package protection to all podcasts

    C

    provides integrated licence to any band

    D

    grants podcasting license to blank disks


    正确答案: B
    解析:
    推断题。a blanket podcasting license出现在最后一段倒数第三句。上一句指出EMI与一些小乐队签约,使其有自己的播客,但该句则提到EMI还未准备批准a blanket podcasting license,可见EMI还有些顾虑,因此可推断“a blanket podcasting license”指的是提供给乐队的一揽子许可,故选C。

  • 第24题:

    单选题
    package test;  class Target {  public String name = “hello”;  }  What can directly access and change the value of the variable name?()
    A

     any class

    B

     only the Target class

    C

     any class in the test package

    D

     any class that extends Target


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