下载JAVA编程思想的源代码,才发现在我的JBUILDER X 运行不了,是不是要设置环境变量?是不是还要下载的JDK?大侠们,救命哦!谢谢谢谢谢谢了啊!^_^//: c03:CastingNumbers.java
// What happens when you cast a float
// or double to an integral value?
// From 'Thinking in Java, 3rd ed.' (c) Bruce Eckel 2002
// www.BruceEckel.com. See copyright notice in CopyRight.txt.
import com.bruceeckel.simpletest.*;public class CastingNumbers {
static Test monitor = new Test();
public static void main(String[] args) {
double
above = 0.7,
below = 0.4;
System.out.println("above: " + above);
System.out.println("below: " + below);
System.out.println("(int)above: " + (int)above);
System.out.println("(int)below: " + (int)below);
System.out.println("(char)('a' + above): " +
(char)('a' + above));
System.out.println("(char)('a' + below): " +
(char)('a' + below));
monitor.expect(new String[] {
"above: 0.7",
"below: 0.4",
"(int)above: 0",
"(int)below: 0",
"(char)('a' + above): a",
"(char)('a' + below): a"
});
}
} ///:~
// What happens when you cast a float
// or double to an integral value?
// From 'Thinking in Java, 3rd ed.' (c) Bruce Eckel 2002
// www.BruceEckel.com. See copyright notice in CopyRight.txt.
import com.bruceeckel.simpletest.*;public class CastingNumbers {
static Test monitor = new Test();
public static void main(String[] args) {
double
above = 0.7,
below = 0.4;
System.out.println("above: " + above);
System.out.println("below: " + below);
System.out.println("(int)above: " + (int)above);
System.out.println("(int)below: " + (int)below);
System.out.println("(char)('a' + above): " +
(char)('a' + above));
System.out.println("(char)('a' + below): " +
(char)('a' + below));
monitor.expect(new String[] {
"above: 0.7",
"below: 0.4",
"(int)above: 0",
"(int)below: 0",
"(char)('a' + above): a",
"(char)('a' + below): a"
});
}
} ///:~
解决方案 »
- struts logic标签怎么换成spring mvc的标签
- 感谢大家的支持~~菜鸟的扫雷修改了一下,再发一次,期待大家的意见
- 在jdk 64位中无法连接access
- 请教奇怪的实例化对像的问题!!!
- 小菜鸟的问题
- java如何调用windows的bat文件
- 小弟想学习JAVA..有经验的人进来指导一下!谢谢了.
- 十万火急:JAVA中如何抽取PDF的内容,用PDFBOX根本无法解决,因为它不支持中文。请大虾们帮帮忙,小弟跪谢了。参与都有分相赠!!!
- 有一串字符"=(A,BC)",我只想取()内的A, B,C请问有什么函数取吗?
- 关于org的poi包的简单问题!!!希望大家帮助!!
- 如何清空一个数组?
- MessageDigest.getInstance("MD5") 有几种参数?
引入的包是否存在.