int
javac
javac
.class
.class
.class
javac
javadoc jdb jar
JDK ⊃ JRE ⊃ JVM
byte
short
int
long L
float f F
double
char
boolean
char
3.14 double float f float f
= 3.14f;
100000000000 L long l = 100000000000L;
byte b = 130; byte b = (byte)130;
null
+ - * / %
+ - ++ -- !
== != > < >= <=
condition ? expr1 : expr2
% 5.5 % 2 = 1.5
&& || & |
>> >>>
++i i++
i = i++ + ++i;
if if
else if
break
switch byte, short, char, int enum String
long float double boolean
val val
ConcurrentModificationException
break
continue
[Link]()
[Link] [Link]()
Object[] objArr = new String[3];
objArr[0] = 10; ArrayStoreException
.equals()
== [Link]()
+
java Demo Hello World 123 args = {"Hello", "World", "123"}
[Link](args[2])
main public static void main(String[] args)
static
String[] Args static NoSuchMethodError: main
int→Integer, char→Character,
boolean→Boolean, byte→Byte, short→Short, long→Long, float→Float, double→Double
ArrayList HashMap
[Link] Integer.MAX_VALUE
Integer IntegerCache
.equals() ==
null NullPointerException
Student s2 = s1; s2 s1
s2 s1
void
new
int add(int,int)
double add(int,int)
foo(5) foo(long) foo(Integer)
foo(long)
StackOverflowError
new
new
this
this(...)
this(...) super(...)
static
static
this super
main
main()
finalize()
try-with-resources Cleaner AutoCloseable
finalize()
private
protected
public
static final abstract synchronized transient
volatile native
public
private protected public .java
[Link] Inner()
new Shape()
super()
abstract
abstract
class C extends A, B
super(args)
super(args)
super()
public protected
static final private
@Override
static
super
final
final
final
public static final
public abstract
default static private
public abstract
implement
instanceof
instanceof
ClassCastException
Animal
Object
[Link]
equals() hashCode()
equal()
hashCode() HashMap HashSet
abstract class interface
default static private
public static final
extends implements
private protected public
public private
Comparable Runnable
[Link]()
System [Link]
[Link]() [Link]() [Link]()
final
out System PrintStream
println() PrintStream
print()
[Link](...) out
System println
[Link]
[Link](PrintStream)
== .equals()
==
new String()
equals() hashCode()
ArrayStoreException
finalize()
null
break
final