下载此文档

达内科技 JAVA 面试 笔试.doc


文档分类:IT计算机 | 页数:约8页 举报非法文档有奖
1/8
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/8 下载此文档
文档列表 文档介绍
选择题
1:下面关于变量及其范围的陈述哪些是错的。




2:
What will be printed when you execute the following code?    
  
class X    
{   
  Y b = new Y();   
  X()    
 {    
   ("X");    
  }   
}    
  
class Y    
{   
    Y()    
   {    
     ("Y");    
   }   
}    
  
public class Z extends X    
{   
   Y y = new Y();    
  Z()    
 {    
    ("Z");    
  }    
   public static void main(String[] args)    
  {   
               new Z();   
  }   
}    
  
Choices:  
What will be printed when you execute the following code?
class X
{
Y b = new Y();
X()
{
("X");
}
}
class Y
{
Y()
{
("Y");
}
}
public class Z extends X
{
Y y = new Y();
Z()
{
("Z");
}
public static void main(String[] args)
{
new Z();
}
}
Choices:




3:
Give the code fragment:   
if(x>4){   
(“Test 1”);}   
else if (x>9){   
(“Test 2”);}   
else {   
(“Test 3”);}   
Which range of value x would produce of output “Test 2”?   
Give the code fragment:
if(x>4){
(“Test 1”);}
else if (x>9){
(“Test 2”);}
else {
(“Test 3

达内科技 JAVA 面试 笔试 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息