black

Java认证考试综合练习

登录

多项选择题

现有: 
public  class  TestDemo{    
private int X-2;     
static int y=3; 
public  void method(){     
final int i=100;     
int j  =10;    
class Cinner { 
public void mymethod(){     
//Here     }     }     }     }
在Here处可以访问的变量是哪些?() 

A.X
B.y
C.j
D.i

相关考题

单项选择题 定义类:      package utils;      public class Rep{  public static String twice (String s){return s+s ;}     }  再定义另一个类Demo:      //insert code here      public class Demo{  public static void main (String[]  args){      System. out .println( twice( "Hello"));      }      }  在第一行插入哪项代码,可以使程序正常编译和执行?()

单项选择题 定义枚举如下:  public  enum  Direction{      EAST,SOUTH,WEST,NORTH      }  下列正确使用该枚举类型的语句是哪项?()

单项选择题 现有:  class TestFoo f      int x;  String y;  int  getX()  {  return  x;  }     String getY()  {return y;  }      void setX (int  x)  {      int Z=7:      this.x=x;      }      可以添加多少个修饰符来封装此类?()

All Rights Reserved 版权所有©计算机考试题库(jsjtiku.com)

备案号:湘ICP备14005140号-4

经营许可证号:湘B2-20140064