3-hexo使用说明
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
数组元素的可变性
数组元素的可变性与数组无关,取决于元素类型。
1)数组元素是不可变的字符串
比如下面程序中,数组元素是字符串类型,原字符串 “XYZ” 的内容是不可改变的,我们只能创建新的字符串并让数组元素指向新创建的字符串。
public static void main(String[] args) {
String[] names = {"ABC", "XYZ", "zoo"};
String s = names[1];
names[1] = "cat";
System.out.println(s); // 输出XYZ
System.out.println(names[1]); // 输出cat
}
Quick Start
class Range<T> {
private T first;
private T last;
public Range(T first, T last) {
this.first = first;
this.last = last;
}
public T getFirst() {
return first;
}
public T getLast() {
return last;
}
}
public class Test {
public static void main(String[] args) {
Range<String> stringRange = new Range<>("a","z");
System.out.println(stringRange.getFirst()+"~"+stringRange.getLast()); // a~z
Range<Integer> integerRangeRange = new Range<>(1,9);
System.out.println(integerRangeRange.getFirst()+"~"+integerRangeRange.getLast()); // 1~9
}
}
Create a new post
$ hexo new "My New Post"
More info: Writing
Run server
$ hexo server
More info: Server
Generate static files
$ hexo generate
More info: Generating
Deploy to remote sites
$ hexo deploy
More info: Deployment
他の者にできたか?ここまでやれたか?この先できるか?いいや、仆にしかできない!