Skip to content

Instantly share code, notes, and snippets.

@jpetitto
Created May 12, 2015 22:10
Show Gist options
  • Save jpetitto/d9ffed9843a5e9bfa358 to your computer and use it in GitHub Desktop.
Save jpetitto/d9ffed9843a5e9bfa358 to your computer and use it in GitHub Desktop.
Anonymous Classes vs Lambdas
Observable.just("Hello, world!")
.subscribe(new Action1<String>() {
@Override
public void call(String s) {
System.out.println(s);
}
});
Observable.just("Hello, world!")
.subscribe(s -> System.out.println(s));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment