易搜题 > 资格证大类 > 计算机编程 > 问题详情
问题详情

You want to limit access to a method of a public class to members of the same class. Which access modifier accomplishes this objective?()  

A、 Public

B、 Private

C、 Protected

D、 Transient

E、 No access modifier is required

未找到的试题在搜索页框底部可快速提交,在会员中心"提交的题"查看可解决状态。 收藏该题
查看答案

相关问题推荐

  • 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()".

  • What is the result?()

    A、 X, followed by an Exception.

    B、 No output, and an Exception is thrown.

    C、 Compilation fails due to an error on line 14.

    D、 Compilation fails due to an error on line 16.

    E、 Compilation fails due to an error on line 17.

    F、 X, followed by an Exception, followed by B

  • An instance member() 

    A、is also called a static member

    B、is always a variable

    C、is never a method

    D、belongs to a single instance, not to the class as a whole

    E、always represents an operation

  • Which two CANNOT directly cause a thread to stop executing?()

    A

     Calling the yield method.

    B

     Calling the wait method on an object.

    C

     Calling the notify method on an object.

    D

     Calling the notifyAll method on an object.

    E

     Calling the start method on another Thread object.

  • public class test (   private static int j = 0;     private static boolean methodB(int k) (  j += k;    return true;   )    public static void methodA(int i) {    boolean b:   b = i 

    A、 The program prints “0”

    B、 The program prints “4”

    C、 The program prints “8”

    D、 The program prints “12”

    E、 The code does not complete.

联系客服 会员中心
TOP