This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header class="globalNav noDropdownTransition"> | |
<div class="container-lg"> | |
<ul class="navRoot"> | |
<li class="navSection logo"> | |
<a class="rootLink item-home colorize" href="/"><h1><svg width="62" height="25"><title>Stripe</title><path d="M5 10.1c0-.6.6-.9 1.4-.9 1.2 0 2.8.4 4 1.1V6.5c-1.3-.5-2.7-.8-4-.8C3.2 5.7 1 7.4 1 10.3c0 4.4 6 3.6 6 5.6 0 .7-.6 1-1.5 1-1.3 0-3-.6-4.3-1.3v3.8c1.5.6 2.9.9 4.3.9 3.3 0 5.5-1.6 5.5-4.5.1-4.8-6-3.9-6-5.7zM29.9 20h4V6h-4v14zM16.3 2.7l-3.9.8v12.6c0 2.4 1.8 4.1 4.1 4.1 1.3 0 2.3-.2 2.8-.5v-3.2c-.5.2-3 .9-3-1.4V9.4h3V6h-3V2.7zm8.4 4.5L24.6 6H21v14h4v-9.5c1-1.2 2.7-1 3.2-.8V6c-.5-.2-2.5-.5-3.5 1.2zm5.2-2.3l4-.8V.8l-4 .8v3.3zM61.1 13c0-4.1-2-7.3-5.8-7.3s-6.1 3.2-6.1 7.3c0 4.8 2.7 7.2 6.6 7.2 1.9 0 3.3-.4 4.4-1.1V16c-1.1.6-2.3.9-3.9.9s-2.9-.6-3.1-2.5H61c.1-.2.1-1 .1-1.4zm-7.9-1.5c0-1.8 1.1-2.5 2.1-2.5s2 .7 2 2.5h-4.1zM42.7 5.7c-1.6 0-2.5.7-3.1 1.3l-.1-1h-3.6v18.5l4-.7v-4.5c.6.4 1.4 1 2.8 1 2.9 0 5.5-2.3 5.5-7.4-.1-4.6-2.7-7.2-5.5-7.2zm-1 11c-.9 0-1.5-.3-1.9-.8V10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Test2 { | |
public static void main(String[] s) { | |
long st = System.currentTimeMillis(); | |
List<String> l0 = new ArrayList<String>(); | |
l0.add("Hello"); | |
l0.add("World!"); | |
List<String> l1 = new ArrayList<String>(); | |
l1.add("Hello"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Test1 { | |
public static void main(String[] s) { | |
long st = System.currentTimeMillis(); | |
List<String> l0 = new ArrayList<String>() {{ | |
add("Hello"); | |
add("World!"); | |
}}; | |
List<String> l1 = new ArrayList<String>() {{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<Integer> intList = [1, 2, 3, 4]; | |
Set<String> strSet = {"Apple", "Banana", "Cactus"}; | |
Map<String, Integer> truthMap = { "answer" : 42 }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// option 1 | |
// this? | |
List<String> list = new ArrayList<String>() {{ | |
add("Hello"); | |
add("World!"); | |
}}; | |
// option 2 | |
// or this? | |
List<String> l = new ArrayList<String>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class App { | |
public App(String name) { | |
System.out.println(name + "'s constructor called"); | |
} | |
static { | |
System.out.println("static initializer called"); | |
} | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.out.printf("%d %f %.4f", 3, Math.E, Math.E); | |
// output: Output: 3 2.718282 2.7183 | |
int[] q = new int[] { 1,3,4,5}; | |
int position = Arrays.binarySearch(q, 2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static java.lang.Math.*; | |
import static java.lang.System.out; | |
public class StaticImports { | |
public static void main(String[] args) { | |
// no more System. ... | |
out.println("Hello World!"); | |
out.println("Considering a circle with a diameter of 5 cm, it has:"); | |
// no more Math. ... | |
out.println("A circumference of " + (PI * 5) + " cm"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Foo foo(String in) { | |
class FooFormat extends Format { | |
public Object parse(String s, ParsePosition pp) { | |
// parse stuff? | |
} | |
} | |
return (Foo) new FooFormat().parse(in); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WithoutMain { | |
static { | |
System.out.println("Where's main?"); | |
System.exit(0); | |
} | |
} |
NewerOlder