Java's father--james Gosling
Java mascot--duke
Compile: Source file (. java file)--"java compiler = =". class file
Run: Class loader-"bytecode checker-" Interpreter (Java cross-platform)--"System operating platform
jdk1.2<-->java2.0
jdk1.5<-->java5.0
Three-mesh operator (implicit conversion)
eg
int a=1;
System.out.println (true? ' B ': 100);
System.out.println (true? ' B ': 100000);
System.out.println (true?a: ' B ');
The answers are: B, 98, 98
Constant naming reason: Easy to modify, the business name into the operation, easy to understand.
The _%_ ends are integers, and the resulting positive and negative symbols follow the dividend.
While/for know the number of times with for, do not know with while.
Recursion--is also a loop that allows a method to invoke itself (every time it does, the next time the result depends on the previous time) {useful: decimal to binary}
public static void fun (int num) {
int i=num%2;
num/=2;
if (num!=0) {
Fun (num);
}
System.out.print (i+ "");
}
Day8 Java Basics Detail Review