题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-22 20:42:32

[单项选择]给出下列的程序,其叙述正确的是( )。  public class Man  static int arr [] new int[10];  public static void main (String a [])  System.out.println(arr [1]);    

A. 编译时将发生错误
B. 编译时正确但是运行时出错
C. 输出为0
D. 输出为null

更多"给出下列的程序,其叙述正确的是( )。  public class "的相关试题:

[单项选择]阅读下面程序
public class VariableUse
 public static void main(String[] arqs)
  int a;
  if(a==8)
   int b=9;
   System.out.println("a="+
A. ;
B. ;
[单项选择]阅读下面程序
public class Cycle
 public static void main(String[] args)
  System.out.println(args[0]);
 

在命令行输入java Cycle one two,该程序输出的结果是
A. Cycle
B. one
C. two
D. 以上三个选项都不对
[单项选择]阅读下列程序:
public class Test
public static void main (String args[])
int x=3;
for (int i=1;i<=10; i++) x=x+i/4;
System. out. println(x);
程序的输出结果是( )。
A. 12
B. 13
C. 14
D. 15
[单项选择]给出下列的程序,其叙述正确的是( )。
public class Man
static int arr[]=new int[10];
public static void main(String args[])
System. out. println (arr[1=];

A. 编译时将发生错误
B. 编译时正确但是运行时出错
C. 输出为0
D. 输出为null
[单项选择]给出下列的程序,其叙述正确的是 ( )
public class Man

static int arr[]=new int[10];
public static void mam(String a[])

System.out.println(arr[1]);


A. 编译时将发生错误
B. 编译时正确但是运行时出错
C. 输出为0
D. 输出为null
[单项选择]有下列程序段
public class fun

public static void main(String args[])

char b[]="Hello,you";
b[5] = 0;
System.out.println(s);

执行此程序后,得到的输出结果是( )。
A. Hello, you
B. Hello0you
C. Hello
D. 0
[单项选择]有下列程序段
public class fun

public static void main(String args[])

char b[] = "Hello,you";
b[5] = 0;
System.out.println(s);

执行此程序后,得到的输出结果是( )。
A. Hello,you
B. Hello0you
C. Hello
D. 0
[单项选择]下列程序的执行结果是   public class Testgg     public static void main(String args[])       float t=9.0f;      int q=5;      System.out.println((t++)*(- -q));       

A. 40
B. 36
C. 36.0
D. 40.0
[单项选择]阅读下面程序
public class Test3
public static void main (String args[])
int x=3,y=4,z=5;
String S="xyz";
System.out.printIn(s+x+y+z);


程序运行的结果是______。
A. xyz12
B. xyz345
C. xyzxyz
D. 12xyz
[单项选择]阅读下面程序
public class Test2
public static void main (String args[])
int a=10, b=4, C=20, d=6;
System.out .printIn(a++*b+c*--d);


程序运行的结果是______。
A. 144
B. 160
C. 140
D. 164
[单项选择]阅读下面程序
public class Test2
 public static void main(String[] args)
  int a=10,b=4.c=20,d=6;
   System.out.println(a++*b+c*--d);
 

程序运行的结果是
A. 144
B. 160
C. 140
D. 164
[单项选择]阅读下面程序
public class Test4
 public static void main(String[] args)
  int 1=10,j=3;
  float m=213.5f,n=4.0f;
  System.out.println(i%j);
  System.out.println(m%n);
 

程序运行的结果是
A. 1.0和1.5
B. 1和1.5
C. 1.0和2.5
D. 1和2.5
[单项选择]阅读下面程序
public class Test3
 public static void main(String[] args)
  int x=3,y=4,z=5;
  String s="xyz":
  System.out.println(s+x+y+z);
 

程序运行的结果是
A. xyz12
B. xyz345
C. xyzxyz
D. 12xyz
[单项选择]下面程序的输出结果是
public class Test
 public static void main(String[] args)
  int[]array=2,4,6,8,10;
  int size=6;
  int result=-1:
  try
   for(int i=0;i<size&&result==-1;i++)
    if(array[i]==20)result=i;
catch(ArithmeticException e)
   System.out.println("Catch---1");
  catch(ArrayIndexOutOfBoundsException e)
   System.out.println("Catch---2");
  catch(Exception e)
   System.out.println("Catch---3");
  
 

A. Catch---1 B) Catch一--2 C) Catch---3 D) 以下都不对

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码