Java
coding进阶
清华,互联网大厂和量化投资
展开
-
import static说明
<br />import static 是Java 5增加的功能。 就是将Import类中的静态方法,可以作为本类的静态方法来用。 比如 import static java.lang.Integer class YourClass { void f () { int i = parseInt ("123") ; // 相当于int i = Integer.parseInt ("123") ; } }原创 2011-04-22 12:47:00 · 457 阅读 · 0 评论 -
Access restriction: The type FileURLConnection is not accessible due to restriction
问题: Access restriction: The type FileURLConnection is not accessible due to restriction on required library C:\Program Files\Java\jdk1.6.0_20\jre\lib\rt.jar 解决方案: 方案一:这是 JRE 的访问限制导致报原创 2012-10-25 20:34:47 · 1408 阅读 · 0 评论 -
shortcut for adjusting your code format
ALT+SHIFT+F原创 2013-03-06 10:32:19 · 895 阅读 · 0 评论 -
Java Eclipse 调出consle控制台
在使用eclipse的时候不知道为什么console控制台默认没有,如果碰到这种情况可以使用如下方法调出console: 菜单栏 Window -> Show View -> Console原创 2013-04-06 18:54:41 · 9003 阅读 · 0 评论 -
Java 环境变量设置
设置classpath和path这两个环境变量即可。 classpath=.;d:\jdk1.6.0\lib; path=%path%;d:\jdk1.6.0\bin;原创 2013-04-06 17:14:21 · 701 阅读 · 0 评论 -
Java: string and int conversion
1. String -> int/Integer String str = "1234"; Integer x = Integer.valueOf(str); int y = Integer.parseInt(str); 2. int-> String int i = 1234; String str = String.valueOf(i);原创 2013-04-10 09:27:22 · 996 阅读 · 0 评论