1.Scanner //获取键盘输入 Scanner sc = new Scanner(System.in); int num = sc.nextIn(); String str = sc.nextLine(); 2.Object 所有类都直接或者间接继承Object类 public class Person{ } public class Test{ public static void main(string[] args){ Person p = new Person(); Person…
一.String类是什么 public final class String implements java.io.Serializable, Comparable<String>, CharSequence { /** The value is used for character storage. */ private final char value[]; /** Cache the hash code for the string */ private int hash; // Def…