Java们
1.Java
1. 知
样
1)知
分
()
2)知(1)
(2)
2. 知
1.知
2.知
3.知
is-aclass dog extends animal,dog is a
animal.
⾃-
4.知
⾃
3. 知
们
样
样样
1.知
2.知
(upcast)
JVM(downcast)
2.Java
1. JavaJavaCC++
Java
2. Java
Java然
样implements
3. Java
JavaInternetJava
样java net会URL
然URLConnection然
Socket然ServerSocketJavaRMI样
4. JavaJava然然是了Java
Java
5. Java
JavaJava
知样ClassLoader然
6. Java
Java样javaJava
样classJava
7. JavaJavaJava
Java样
8. Java
Java
9. JavaJavaThread
样
:https://blog.csdn.net/shenzixincaiji/article/details/82766104
3. JDK JRE
JDK知Java Development Kit Java Java
JRE知Java Runtime Environment Java Java
JDK JRE Java Javac Java
知 Java JRE
Java JDK
4.Java
Tips:boolean41
Java
为
友
⽣Java
知
1.
2.
看想
5.mainprivate
”mainpublic”ideapublic
6.public static void main(String args[])
public: mainJavaJava
pulic.
static: Javastatic
void: main
Stringargs为
7.==equals
==String
.
==equalspublic boolean equals(Object obj) Object
true,==
String, BitSet, Date, FileequalsString
为
知
8.Object
ObjectObject
clone Cloneable
CloneNotSupportedException
equals Object==
hashCode equalshashCode
Collection
getClass final
wait wait()
wait(long timeout)
1然notify
public class EqualsTest {
public static void main(String[] args) {
String s1 = “abc”;
String s2 = s1;
String s5 = “abc”;
String s3 = new String(”abc”);
String s4 = new String(”abc”);
System.out.println(”== comparison : ” + (s1 == s5));
System.out.println(”== comparison : ” + (s1 == s2));
System.out.println(”Using equals method : ” + s1.equals(s2));
System.out.println(”== comparison : ” + s3 == s4);
System.out.println(”Using equals method : ” + s3.equals(s4));
}
}
== comparison : true
== comparison : true
Using equals method : true
false
Using equals method :true