Skip to content

Instantly share code, notes, and snippets.

@dai0304
Created May 23, 2012 02:58
Show Gist options
  • Save dai0304/2773013 to your computer and use it in GitHub Desktop.
Save dai0304/2773013 to your computer and use it in GitHub Desktop.
public class Stateful {
private String message = "Hello, world!";
public void setMessage(String message) {
this.message = message;
}
public void hello() {
System.out.println(message);
}
}
public class Stateless {
public void hello() {
System.out.println("Hello, world!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment