black

SCJP程序员认证考试

登录

单项选择题

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

相关考题

多项选择题 public class Parent {  public int addValue( int a, int b) {     int s;     s = a+b;     return s;     }     }  class Child extends Parent {  }  Which methods can be added into class Child?()

单项选择题 Given the following code:     public class Person{     int arr[] = new int[10];  public static void main(String a[]) {     System.out.println(arr[1]);     }     }  Which statement is correct?()

单项选择题 Given the following code:     public class Person{ static int arr[] = new int[10];  public static void main(String a[]) {     System.out.println(arr[1];)     }     }  Which statement is correct?()

All Rights Reserved 版权所有©易学考试网(yxkao.com)

备案号:湘ICP备2022003000号-3