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 void waitAMinute() { | |
reallyReallyWait(60000); | |
} | |
public void reallyReallyWait(int millis) { | |
int before = System.currentTimeMillis(); | |
try { | |
Thread.sleep(millis); | |
} | |
catch (InterruptedException | StackOverflowError e) { |
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
package nl.jqno.equalsverifier; | |
import org.apache.commons.lang3.builder.EqualsBuilder; | |
import org.apache.commons.lang3.builder.HashCodeBuilder; | |
import org.junit.Test; | |
public class ApacheDoubleTest { | |
static final class Doubler { | |
private final double d; |
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 Looper { | |
public static void main(String[] args) throws Exception { | |
int five = 5; | |
Field field = Integer.class.getDeclaredField("value"); | |
field.setAccessible(true); | |
field.set(five, 4); | |
for (Integer i = 0; i < 10; i++) { | |
System.out.println(i); |
OlderNewer