题目内容

public class Application2_2 {public static void main (String args[ ]) {【代码1】 //用char声明名字为chinaWord和japanWord的变量,初值分别是'好'和'ぁ'【代码2】 //用char声明名字为you的变量,初值是65【代码3】 //用int声明名字为position的变量,初值是20320System.out.printf("汉字:%c的索引位置:%d\n",chinaWord,(int)chinaWord);System.out.printf("日文:%c的索引位置:%d\n",japanWord,(int)japanWord);System.out.printf("%d位置上的字符是:%c\n",position,(char)position);char fire = 119;char warnning = '火';System.out.printf("火警电话是%d,%c%c%c%c",(int)fire,warnning,warnning,warnning,warnning);【代码4】 //输出一对双引号}}

查看答案
更多问题

public class Application2_3 {public static void main (String args[ ]) {int unitPrice = 789;【代码1】 //用float声明名字是goldMeasure1的变量【代码2】 //用double声明名字是goldMeasure2的变量;double price;【代码3】 //将float常量8.987654321f赋值给goldMeasure1price = unitPrice*goldMeasure1;System.out.printf("计量工具1显示的戒指的质量是:%12.10f\n",goldMeasure1);System.out.printf("根据计量工具1给出戒指的价格是:%f元\n",price);【代码4】 //将double常量8.987654321赋值给goldMeasure2price = unitPrice*goldMeasure2;System.out.printf("计量工具2显示的戒指的质量是:%12.10f\n",goldMeasure2);System.out.printf("根据计量工具2给出戒指的价格是:%f元\n",price);}}

public class Application2_4 {public static void main (String args[ ]) {short a,b,c;【代码1】 //用boolean声明名字是isTriangle变量a = 5;b = 4;c = 3;if(a+b>c&&a+c>b&&b+c>a)【代码2】 //true赋值给isTriangleelse【代码3】 // false赋值给isTriangleSystem.out.printf("%d,%d,%d构成三角形吗?回答:%b\n",a,b,c,isTriangle);a = 15;b = 40;c = 73;if(a+b>c&&a+c>b&&b+c>a)isTriangle = true;elseisTriangle = false;System.out.printf("%d,%d,%d构成三角形吗?回答:%b\n",a,b,c,isTriangle);}}

import java.util.Scanner;public class Application2_5 {public static void main (String args[ ]) {Scanner reader = new Scanner(System.in);double weight,chargeWeight,charge;System.out.printf("输入行李重量:");weight = reader.nextDouble();【代码1】 //将 (int)weight赋值给chargeWeightSystem.out.printf("行李重量:%f(kg),火车的计费重量:%f(kg)\n",weight,chargeWeight);【代码2】 //将chargeWeight*12.6的值赋值给chargeSystem.out.printf("用火车托运的费用:%f元\n", charge);【代码3】//将 (int)(weight+0.5)赋值给chargeWeightSystem.out.printf("行李重量:%f(kg),汽车计费重量:%f(kg)\n",weight,chargeWeight);【代码4】//将chargeWeight*22.5的值赋值给chargeSystem.out.printf("用汽车托运的费用:%f元\n", charge);}}

任何非零矩阵总可以经过有限次初等行变换变为行阶梯形矩阵和行最简形矩阵.

A. 对
B. 错

答案查题题库