Coggle requires JavaScript to display documents.
Java Syntax
enum
for (EnumType e : EnumType.values()) { System.out.println(toString() ordinal() + name()); }
switch (this){ case RED: return xx; case YELLOW: return yy; }
public enum xx{ RED(1), YELLOW(2);.... xx(int i){ // ...; } }
"object"
"a class name + object id"
String
StringBuilder
String s = "h";s = s + 1
"h1"
"A" + "B"
+= "A";+= "B"
append("A");.append("B")
s += "hello"
StringBuffer
java.lang
String s = "hell" + "o";
String s = "hello";
Integer i1 = 123;
Integer i4 = Integer.valueOf(123);
String s1 = s.intern();
Integer i3 = 122 + new Integer(1);
String s = new String("hello");
Integer i2 = new Integer(123);
String s5 = "hell" + new String("o");
122 + new Integer(1);
"hell" + new String("o");
valueOf
String s1 = String.valueOf(s2);
s1 == s2
String s2 = new String("hello");
==
equals
ArrayList<String> list =
NumberCarrier anotherObject = new NumberCarrier(){ privete int number; //...}
public interface InterfaceName (constant declartions; abstract metho xxx)
import java.time.*;
import java.time.LocalDate
import java.lang.System.out;out.println("xxx");