下列代码的执行结果是: int length = "Hello".length(); System.out.println(length);
举一反三
- 下列代码的执行结果是____。 Int length="Hello".length(); System.out.println(length); A: 5 B: 2 C: 10 D: 6
- 下列哪些是正确的声明变量的方式? A: int length; int width; B: int length, width; C: int length; width; D: int length, int width;
- 下列程序的输出结果为 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()); }}
- 语句SELECT CHAR_LENGTH(ILOVEYOU), LENGTH(我爱你); 的执行结果是
- 下列在执行过程中不存在问题。( ) int intArray[]={0,2,4,6,8}; int length=int Array.length();