• 2021-04-14 问题

    设有如下程序publicclasstest{publicstaticvoidmain(Stringargs[]){IntegerintObj=Integer.valueOf(args[args.length-1]);inti=intObj.intValue();if(args.length>1) System.out.println(i);if(args.length>0) System.out.println(i-1);elseSystem.out.println(i-2);}}运行程序,输入如下命令

    设有如下程序publicclasstest{publicstaticvoidmain(Stringargs[]){IntegerintObj=Integer.valueOf(args[args.length-1]);inti=intObj.intValue();if(args.length>1) System.out.println(i);if(args.length>0) System.out.println(i-1);elseSystem.out.println(i-2);}}运行程序,输入如下命令

  • 2022-05-31 问题

    下列程序的输出结果为 class Box{ int length,width,height; public void setInfo(int l,int w,int h){ length = l; width = w; height = h; } public int volumn(){ return length*width*height; } public int area(){ return (length*width + length*height + width*height) * 2; } public String toString(){ return "Length:" + length + " width:" + width + " height:" + height + " volumn: " + volumn() + " area:" + area(); }} public class BoxTest { public static void main(String[] args) { Box b = new Box(); b.setInfo(5,2,4); System.out.println(b.toString()); }}

    下列程序的输出结果为 class Box{ int length,width,height; public void setInfo(int l,int w,int h){ length = l; width = w; height = h; } public int volumn(){ return length*width*height; } public int area(){ return (length*width + length*height + width*height) * 2; } public String toString(){ return "Length:" + length + " width:" + width + " height:" + height + " volumn: " + volumn() + " area:" + area(); }} public class BoxTest { public static void main(String[] args) { Box b = new Box(); b.setInfo(5,2,4); System.out.println(b.toString()); }}

  • 2022-06-07 问题

    请阅读下面程序public class ExampleStringBuffer{ public static void main (String[] args){ StringBuffer sb = new StringBuffer (“test”); System.out.println(“buffer = ”+sb); System.out.println(“length = ” + sb.length() ); }}程序运行结果中在"length ="后输出的值是()。 A: 10 B: 20 C: 30 D: 4

    请阅读下面程序public class ExampleStringBuffer{ public static void main (String[] args){ StringBuffer sb = new StringBuffer (“test”); System.out.println(“buffer = ”+sb); System.out.println(“length = ” + sb.length() ); }}程序运行结果中在"length ="后输出的值是()。 A: 10 B: 20 C: 30 D: 4

  • 2021-04-14 问题

    182. The length of a wave is the length ______.

    182. The length of a wave is the length ______.

  • 2022-05-27 问题

    What is the ratio of the length of the mining zone to the length of the bench?( ) A: Full length or part of it B: Full length C: Part of it D: None

    What is the ratio of the length of the mining zone to the length of the bench?( ) A: Full length or part of it B: Full length C: Part of it D: None

  • 2022-06-01 问题

    下列代码的执行结果是: int length = "Hello".length(); System.out.println(length);

    下列代码的执行结果是: int length = "Hello".length(); System.out.println(length);

  • 2022-05-30 问题

    6. main方法的正确形参是( )? A: String args B: string args[] C: string args D: String args[]

    6. main方法的正确形参是( )? A: String args B: string args[] C: string args D: String args[]

  • 2022-06-11 问题

    下面哪个是main()函数的合法参数?( ) A: char args[] B: char args[][] C: String args[] D: String args

    下面哪个是main()函数的合法参数?( ) A: char args[] B: char args[][] C: String args[] D: String args

  • 2022-06-06 问题

    下列程序的功能是显示用户在命令行方式下指定的任意驱动器目录,请补充程序。 import java.iO.*; public class FindDirectories { public static void main (String args[ ]) { if(args.length= =0) args=new String[ ]".."}; try { File pathName=new File(args [0]); String[]fileName=pathName.list( ); for(int i=0;<fileName.length;i+ += { File f=new 【 】 if(f.isDirectory( )) { System.out.println(f.getCanonicalPath( )); main(new String[ ] { f.getPath( ) }); } } = catch(IOException e) { e.printStackTrace( ); } = =

    下列程序的功能是显示用户在命令行方式下指定的任意驱动器目录,请补充程序。 import java.iO.*; public class FindDirectories { public static void main (String args[ ]) { if(args.length= =0) args=new String[ ]".."}; try { File pathName=new File(args [0]); String[]fileName=pathName.list( ); for(int i=0;<fileName.length;i+ += { File f=new 【 】 if(f.isDirectory( )) { System.out.println(f.getCanonicalPath( )); main(new String[ ] { f.getPath( ) }); } } = catch(IOException e) { e.printStackTrace( ); } = =

  • 2022-07-22 问题

    length A: length B: launch C: lend

    length A: length B: launch C: lend

  • 1 2 3 4 5 6 7 8 9 10