# justke 最近markdown语法情有独钟,特来helloworld```JAVApublic class { public static void main() { System.out.println("Hello World"); }]```
分类:
其他好文 时间:
2014-07-19 18:10:39
阅读次数:
185
在看hadoop 的二次排序的时候,改写了下, 加了第三个参数, 本来以为是在 public int compareTo(IntPair o) { System.out.println("-----------compareTo"); if (first != o.first...
分类:
其他好文 时间:
2014-07-19 17:10:26
阅读次数:
256
char chars[] ={'a','b','c'}; String s = new String(chars); int len = s.length();//字符串长度 System.out.println(chars);//ab System.out.println(s);//abc...
分类:
其他好文 时间:
2014-07-19 16:10:36
阅读次数:
206
场景先看段代码,考虑以下场景,其运行结果是什么?public class Test { static int i = 8; public void printI() { int i = 88; System.out.println(this.i); } ...
分类:
其他好文 时间:
2014-07-19 14:07:59
阅读次数:
159
1 public static void main(String[] args) { 2 String s = "你好"; 3 String cn = ""; 4 System.out.println("src: " + s); 5 ...
分类:
其他好文 时间:
2014-07-19 12:26:34
阅读次数:
147
1.不同调用顺序,不同调用方式的比较 1 class Some { 2 static{ 3 System.out.println("1"); 4 } 5 6 public Some(){ 7 System.out.println("2...
分类:
其他好文 时间:
2014-07-19 09:00:23
阅读次数:
172
通常来说,编程语言教程中的第一个程序应该在屏幕上打印“Hello, world”。在 Swift 中,可以用一行代码实现:println("hello,world")如果你写过 C 或者 Objective-C 代码,那你应该很熟悉这种形式——在 Swift 中,这行代码就是一个完整的程序。你不需要...
分类:
其他好文 时间:
2014-07-18 17:28:54
阅读次数:
307
1、利用System.getProperty()函数获取当前路径:System.out.println(System.getProperty("user.dir"));//user.dir指定了当前的路径2、使用File提供的函数获取当前路径:File directory = new File(""...
分类:
编程语言 时间:
2014-07-18 00:12:41
阅读次数:
286
public class StaticDemo {
private int count=0;
private static int staticCount=0;
public StaticDemo() {
System.out.println(++count);
System.out.println(++staticCount);
}
public static void mai...
分类:
其他好文 时间:
2014-07-17 16:26:01
阅读次数:
184
JDK1.5对for语句进行了改进,为更好遍历数组,改进后的for语句格式如下:for(声明循环变量:数组名){...}如:charb[]={'a','b','c','d'};for(charch:b){System.out.println(ch);//打印出数组b中的元素}可以方便的实现对list...
分类:
编程语言 时间:
2014-07-17 11:09:58
阅读次数:
220