package com.b; public class Cor { public static void main(String[] args) { String a = "this is my book"; String[] c = a.split(" "); for (int i = 0; i < c.length; i++) { System.out.println(c[i]); } } }…
一般this在各类语言中都表示“调用当前函数的对象”,java中也存在这种用法: public class Leaf { int i = 0; Leaf increment(){ i++; return this; //this指代调用increment()函数的对象 } void print(){ System.out.println("i = " + i); } public static void main(String[] args) { Leaf x = new Leaf()…