最赞回答 / 懒秀才
public class PointLaterLength { public static void main(String[] args) { double ver = 123.321; String str = String.valueOf(ver);//将浮点数转变成字符串 String[] arr = str.split("\\.");//切割字符串 System.out.println(arr[1].length());//获取小数点...
2019-08-28
最新回答 / Nikolor
if()后面没有分号;男子女子组输出写反了第一个if少个}参照代码:public class HelloWorld { public static void main(String[] args) { int score = 94; String sex = "女"; if(score>80){ if(sex.equals("女")){ System.out.println("进入女子决赛组"); } ...
2019-08-27
最新回答 / 吕小绿与红鲤鱼与绿鲤鱼与驴
这里先运算了 three = one + two; three的值已经是30了。再运行 three += one; 相当于 30 + 10,输出结果为:40;
2019-08-24