给出下面代码: public class Person{ static int arr[] = new int[10];public static void main(String a[]) {System.out.println(arr[1]); } } 那个语句是正确的()。
相似题目
-
给出下列java源代码: //Point x Public class Interesting{} 在源代码//point x处添加()能符合java语法
-
下面代码的运行结果为:( )import java.io.*;import java.util.*;public class foo{public static void main (String[] args){String s;System.out.println(s= + s);}}
-
给出下列代码,如何使成员变量m 被方法fun()直接访问?class Test{private int m;public static void fun(){...}}
-
给出下面代码: public class Parent{int change(){ }} class Child extends Parent{} 可加入类Child中的方法是( )。
-
读代码:public class ExceptionTest {class TestException extends Exception {}public void runTest () throws TestException {}public void test () /* Point X*/ {runTest ();}}第4行//point X 位置, 加哪行代码能让代码可编译
-
给出下面的代码段:( )public class Base{int w, x, y, z;public Base(int a, int b){x=a; y=b;}public Base(int a, int b, int c, int d){//assignment x=a, y=bw=d;z=c;}}在代码说明//assignment x=a, y=b处写下如下哪几个代码是正确的?()
-
执行下面代码,下面描述正确的是( ) public class Person{ static int arr[]=new int[10]; public static void main(String a[]){ System.out.println(arr[1]); } }
-
请看如下代码 class Person {private int a;public int change(int m){return m;}}public class Teacher extends Person{public int b;public static void main(String arg[]){Person p = new Person();Teacher t = new Teacher();int i;// point x}}下面哪些放在// point x?行是正确的?
-
给出下面的程序代码:public class X4_1_3 { private float a; public static void m ()访问
-
下面这段代码编译和运行时会发生什么情况()。 abstract class MineBase { abstract void amethod(); static int i; } public class Mine extends MineBase { public static void main(String[] args) { int[ ] ar = new int[5]; for(int i=0; i < ar.length; i++) System.out.println(ar[i]); } }
-
给出下面代码: public class Person{ static int arr[] = new int[10];public static void main(String a[]) {System.out.println(arr[1]); } } 编译时正确,运行时将产生错误是正确的。()
-
给出下面代码: public class Person{ static int arr[] = new int[10];public static void main(String a[]) {System.out.println(arr[1]); } }()是正确的。
-
给出下面代码: public class Person{ static int arr[] = new int[10];public static void main(String a[]) {System.out.println(arr[1]); } } 哪个语句是错误的()。
-
给出下面代码: public class Person{ static int arr[] = new int[10];public static void main(String a[]) {System.out.println(arr[1]); } }编译时将产生错误)是正确的。()
-
给出下面代码: public class Person{ static int arr[] = new int[10];public static void main(String a[]) {System.out.println(arr[1]); } } 哪个语句是正确的()。
-
代码三: public class Test03 { public static void main(); } }
-
以下代码可以编译通过 public class Test01 { public static void main(); } }
-
用下面那个代码代替程序标注的【代码】会导致编译错误?public class E{public static void main(String args[]){int m=10,n=0;if(【代码】){System.out.println(“Hello”);}}}()
-
给定如下代码,下面可以作为该类的构造函数的是()public class Test {}
-
代码四: public class Test04 { public static void main(); n--; } } }
-
给出下面代码:public class test{static int a[] = new a[10];public static void main(){System.out.println();}}下列选项正确的是()
-
给出下面一段程序,选择运行结果() public class X{ public static void main(String[] args){ String names[] = new String[5]; for(int x=0; x<args.length; x++) names[x]=args[x]; System.out.println(names[2]); } } 命令行执行:java X 结果是下面哪一个?
-
3、阅读下面代码,写出输出结果: public class A { public void fun1(int n) { Console.WriteLine("{0}x2={1}", n, 2 * n); } public void fun2(int n) { Console.WriteLine("{0}x3={1}", n, 3 * n); } } public delegate void mydelegate(int n) public class Test { public static event mydelegate p; static void Main() { A a = new A(); p += new mydelegate(a.fun1); p(1); } }
-
20、下面代码的运行结果为:() public class Rectangle {public int width = 3;public int height = 4;public int area() {return width * height; }public static void main(String args[]) { Rectangle rectangle = new Rectangle(); rectangle.height = 5; System.out.println(rectangle.area()); }}
推荐题目
- II类下滑信标的下滑道弯曲,从ILS的A点到B点为()。
- 流动资金贷款管理办法规定贷款人应采取现场与非现场相结合的形式履行尽职调查,形成书面报告,并对其内容的()负责。
- 传输设备工程中,在接入层的站点的传输设备一般只测试的指标包括()。
- 患者仅1项依赖提示其Katz分级为()。
- 在个人委托贷款业务中,我行是()。
- 预测项目的资产负债变化是为了考察项目的()。
- 《大人国》和《小人国》的故事出自英国童话()。
- 下列加点字的读音完全相同的一项是()(分值
- 一台同步发电机欲并网运行,在满足电压、相序、相位、波形条件的基础上,若该发电机的极对数为1时,那么该发电机的转速为()
- 170、样本均值、样本方差分别是总体均值、总体方差的相合估计量.