摘要: import java.util.*;public class BookTest{ public static void main(String[] args) { //Book book = new Book("A Tale of Two Cities... 阅读全文
posted @ 2017-06-27 22:02 2021年的顺遂平安君 阅读(66) 评论(0) 推荐(0)
摘要: ``` import java.util.*; public class BookTest { public static void main(String[] args) { //Book book = new Book("A Tale of Two Cities", 1895); Book book = new Book("A Tale of Two Cities"); Sy... 阅读全文
posted @ 2017-06-27 22:02 2021年的顺遂平安君 阅读(347) 评论(0) 推荐(0)
摘要: http://www.javaworld.com/article/2979739/learn java/java 101 classes and objects in java.html?page=3 This example declares a count integer field that 阅读全文
posted @ 2017-06-27 20:24 2021年的顺遂平安君 阅读(3447) 评论(0) 推荐(0)
摘要: http://www.javaworld.com/article/2979739/learn-java/java-101-classes-and-objects-in-java.html?page=3 class Book{ // ... ... 阅读全文
posted @ 2017-06-27 20:24 2021年的顺遂平安君 阅读(118) 评论(0) 推荐(0)
摘要: public class multiarraysExample1{ public static void main(String[] args) { int[][] magicSquare = { {16,3,2,13}, {5,10,1... 阅读全文
posted @ 2017-06-27 12:20 2021年的顺遂平安君 阅读(50) 评论(0) 推荐(0)
摘要: ``` public class multiarraysExample1 { public static void main(String[] args) { int[][] magicSquare = { {16,3,2,13}, {5,10,11,8}, {9,6,7,12 }, {4,15,1 阅读全文
posted @ 2017-06-27 12:20 2021年的顺遂平安君 阅读(126) 评论(0) 推荐(0)
摘要: 输出结果: 阅读全文
posted @ 2017-06-27 11:29 2021年的顺遂平安君 阅读(311) 评论(0) 推荐(0)
摘要: public class Understand_String_args{ public static void main(String[] args) { System.out.printf("args[0] = %s\n", args[0]); Sy... 阅读全文
posted @ 2017-06-27 11:29 2021年的顺遂平安君 阅读(58) 评论(0) 推荐(0)
摘要: Do NOT use the `==`` operator to test whether two strings are equal! It only determines whether or not the strings are stored in... 阅读全文
posted @ 2017-06-27 11:20 2021年的顺遂平安君 阅读(64) 评论(0) 推荐(0)
摘要: Do _NOT_ use the operator to test whether two strings are equal! It only determines whether or not the strings are stored in the same location. Sure, 阅读全文
posted @ 2017-06-27 11:20 2021年的顺遂平安君 阅读(247) 评论(0) 推荐(0)
摘要: Array Initialization = `a[]`的值会被初始化为0 `int[] smallPrimes = {2, 3, 5, 7, 11, 13}; 在不新建数组的情况下重新初始化一个数组变量 Array Copying 阅读全文
posted @ 2017-06-27 11:19 2021年的顺遂平安君 阅读(234) 评论(0) 推荐(0)
摘要: Array Initialization int[] a; = int a[]; int[] a = new int[100]; a[]的值会被初始化为0 `int[] smallPrimes = {2, 3, 5, 7, 11, 13}; new... 阅读全文
posted @ 2017-06-27 11:19 2021年的顺遂平安君 阅读(59) 评论(0) 推荐(0)