下载此文档

北京达内科技有限公司 java软件工程师培训生 android.doc


文档分类:IT计算机 | 页数:约15页 举报非法文档有奖
1/15
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/15 下载此文档
文档列表 文档介绍
选择题
1:在软件生命周期中,下列哪个说法是不准确的?
、开发和运行三个阶段



2:
What will be the result of executing the following code?    
  
public static void main(String args[])   
{   
   char digit = 'a';   
   for (int i = 0; i < 10; i++)   
   {   
     switch (digit)   
     {   
       case 'x' :   
       {   
         int j = 0;   
         (j);   
       }   
       default :   
       {   
       int j = 100;   
(j);   
       }   
     }   
  }   
  int i = j;   
  (i);   
}    
  
Choices:  
What will be the result of executing the following code?
public static void main(String args[])
{
char digit = 'a';
for (int i = 0; i < 10; i++)
{
switch (digit)
{
case 'x' :
{
int j = 0;
(j);
}
default :
{
int j = 100;
(j);
}
}
}
int i = j;
(i);
}
Choices:
will be printed 11 times.
code will pile because the variable i cannot be declared twice within the main() method.
code will pile because the variable j cannot be declared twice within the switch statement.
of these.
3:
下述程序代码中有语法错误的行是(  )。  
int i,ia[10],ib[10];      /*第一行*/  
for (i=0;i<=9;i++)        /*第2行*/  
  ia[i]=0;          /*第3行*/  
ib=ia;    /*第4行*/  
下述程序代码中有语法错误的行是( )。
int i,ia[10],ib[10]; /*第一行*/
for (i=0;i<=9;i++) /*第2行*/
ia[i]=0; /*第3行*/
ib=ia; /*第4行*/




4:
The following code is entire contents of a file called ,causes precisely one error pilation:   
 class SubClass extends BaseClass{   
 }   
 class BaseClass(){   
 String str;   
 public BaseClass(){   
 (“ok”);}   
 public BaseClass(String s){   
 str=s;}}   
 public class Example{   
 public void method(){   
 SubClass s=new SubClass(“hello”);   
 BaseClass b=new BaseClass(“world”);   
 }   
 }   
  
Which 

北京达内科技有限公司 java软件工程师培训生 android 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数15
  • 收藏数0 收藏
  • 顶次数0
  • 上传人771635255
  • 文件大小258 KB
  • 时间2018-05-09