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
FIXME ★【井川】 | |
コメントのタグ | |
// TODO: | |
ここに読み込み機能を記述する | |
// FIXME: | |
修正項目を記述するタグ |
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 java.util.HashMap; | |
import java.util.Map; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.locks.Lock; | |
import java.util.concurrent.locks.ReentrantReadWriteLock; | |
public class TestReentrant implements Runnable { | |
Map<String, String> pool = new HashMap<String, 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
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import org.apache.commons.lang.StringUtils; | |
import org.apache.commons.lang.time.StopWatch; | |
public class StringEquals { |
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 java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
public class ThreadTest6 { | |
public static void main(String[] args) { | |
System.out.println("Entering main"); | |
ExecutorService exec = Executors.newCachedThreadPool(); |
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 java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
public class ThreadTest5 { | |
public static void main(String[] args) { | |
System.out.println("Entering main"); | |
ExecutorService exec = Executors.newSingleThreadExecutor(); |
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 java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
public class ThreadTest4 { | |
public static void main(String[] args) { | |
System.out.println("Entering main"); | |
ExecutorService exec = Executors.newFixedThreadPool(4); |
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
// キーの一覧を表示する | |
for (String s : map.keySet()) System.out.println(s); | |
// 値の一覧を表示する | |
for (String s : map.values()) System.out.println(s); | |
// キーと値の一覧を表示する | |
for (Map.Entry<String, String> e : map.entrySet()) | |
System.out.println(e.getKey()+" : "+e.getValue()); |
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
sudo apt-get -yV install openjdk-6-jdk | |
sudo apt-get -yV install openjdk-6-jre | |
sudo apt-get -yV install openjdk-6-jre-headless | |
sudo apt-get -yV install openjdk-6-jre-lib | |
sudo apt-get -yV install icedtea-6-jre-cacao | |
sudo apt-get -yV install openjdk-6-jre-headless | |
sudo apt-get -yV install icedtea-6-jre-jamvm | |
sudo apt-get -yV install icedtea-6-plugin | |
sudo apt-get -yV install openjdk-7-jdk | |
sudo apt-get -yV install openjdk-7-jre |
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 Multcatch { | |
public static void main(String[] args) { | |
String s = "a"; | |
try{ | |
exception(s); | |
} catch(AException | BException e){ | |
System.out.println("Exception"); | |
} | |
} | |
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 AutoClose { | |
public static void main(String[] args) { | |
try (AutoCloseable a = new AutoClose().new AutoCloseable()) { | |
System.out.print("A"); | |
} catch (Exception e) { | |
System.out.print("B"); | |
} finally { | |
System.out.print("C"); | |
} |