请在下面程序中的每条横线处填写一个语句,使程序的功能完整。程序的输出结果为:TIME=1867b=9i=123注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。源程序文件代码清单如下:import java.io.*;public class DataType{public ______ void main(String args[]){byte b;int i;//定义变量i为int类型______//定义常量TIME为整型,且值为1867i=123;//给变量i赋值,该值为十进制的123______//给变量赋值,改值为八进制的11,十进制的9System.out.println("TIME"+TIME);System.out.println("b="+b);System.out.println("i="+i);}}

请在下面程序中的每条横线处填写一个语句,使程序的功能完整。程序的输出结果为:

TIME=1867

b=9

i=123

注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。

源程序文件代码清单如下:

import java.io.*;

public class DataType

{

public ______ void main(String args[])

{

byte b;

int i;//定义变量i为int类型

______//定义常量TIME为整型,且值为1867

i=123;//给变量i赋值,该值为十进制的123

______//给变量赋值,改值为八进制的11,十进制的9

System.out.println("TIME"+TIME);

System.out.println("b="+b);

System.out.println("i="+i);

}

}


相关考题:

最大真约数是指一个数的(除它本身之外)最大约数。下面的程序是求一个数的最大真约数,请在程序的每条横线处填写一个语句,使程序的功能完整(例如:100的最大真约数是50)。注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。public class MaxDiv{public static void main(String args[ ]){int a=100;______________while(i0){if(____________________)_____________________i--;}System. out. print in (a+"的最大真约数为: "+i );}}

下面的程序是用do-while语句计算10的阶乘。请在程序的每条横线处填写1个语句,使程序的功能完整。注意:请勿改动main()主方法和其他已有的语句内容;仅在横线处填入适当的语句。源程序文件代码清单如下:public class DoWhileLoop{public static void main(______){int n=10;long result=1;do{_____;}_____;System.out.println("10的阶乘为:"+result);}}

下面程序执行后,输出结果为:true请在程序的每条横线处填写一个语句,使程序的功能完整。注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。public class TestStringCompare{{public static void main(String ____________________ args){char charl[]={'t','e','s','t'};char char2[]={'t','e','s','t','1'};String str1=new String(___________________);String str2=new String(char2,0,4);System.out.println(__________________________);}}

下面的程序的功能是将数组array下标为奇数的元素相乘(数组的位置是从0开始的),并将乘积存放到变量total中。请在程序的每条横线处填入适当的语句,使程序的功能完整。注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。public class JiShuJi{public static void main(String args[ ]){int array[ ]={1,2,3,5,7,9};long total= ________________________;for(int i=1;i<=__________________ i++){____________________i++;}System.out.println(total);}}

下面程序的功能是将数组array下标为奇数的元素相乘(数组的位置是从0开始的),并将乘积存放到变量 total中。请在程序的每条横线处填写—个位运算符,使程序的功能完整。注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。源程序代码文件清单如下:public class JiShuJi{public static void main(String args[]){int array[ ]={1,2,3,5,7,9};long total=for(int i=1;i<=______;i++){______;i++;}System.out.println(total);}}

下面的程序的功能是简单的进行键盘输入测试,请在程序的每条横线处填写一个语句,使程序的功能完整。注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。____________________public class TestKeyBoardInPut{public static void main(String[] args){String yourname=JOptionPane. ____________________ ("What is your name?");System.out.println("Hello"+yourname);____________________.exit(0);}}

下面的程序是用do_while语句计算10的阶乘。请在程序的每条横线处填写一个语句,使程序的功能完整。注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。源程序文件代码清单如下:public class DoWhileLoop{public static void main(________){int n=10;long result=1;do{_______________}______________System.out.println("10的阶乘为: "+result);}}

下面是打印输出所有和为10000的连续整数(如:1998,1999,2000,2001,2002)的程序,请在每条横线处填写适当语句,使程序的功能完整。注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。public class Sum10000{public static void main(String args[ ]){int i;int j;int k;int sum;for(i=1;i<=10000;______________){sum=0;j=i;__________________;while(sum<10000){______________if(sum==10000) {for(k=i;k<=j;k++)System.out.println(k+ "");System.out.println("********");}}}}

下面是关于字符界面基本输入输出的程序,请在程序的每条横线处填写一个语句,使程序的功能完整。注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。______________________public class SimpleCharInOut{public static void main(String args[]){char c=" ";System.out.println("Enter a character please: ");try{____________________//接受用户键盘输入的字符并保存在变量c中}catch(________________________e){}System.out.println("You've entered character "+c);}}