Skip to content

Instantly share code, notes, and snippets.

@yusuke
Created October 7, 2014 15:30
Show Gist options
  • Select an option

  • Save yusuke/2f3a301b8d867f6b3e38 to your computer and use it in GitHub Desktop.

Select an option

Save yusuke/2f3a301b8d867f6b3e38 to your computer and use it in GitHub Desktop.
public static void main(String[] args) throws TwitterException {
Twitter twitter = TwitterFactory.getSingleton();
IntStream.rangeClosed('a', 'Z').forEach(e -> {
try {
twitter.updateStatus(String.format("@syobochim %sカップ", (char) e));
} catch (TwitterException e1) {
e1.printStackTrace();
}
});
}
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
public static void main2(String[] args) throws TwitterException {
Twitter twitter = TwitterFactory.getSingleton();
twitter.onException(e -> e.printStackTrace());
IntStream.rangeClosed('a', 'Z').forEach(e -> twitter.updateStatus(String.format("@syobochim %sカップ", (char) e)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment