Skip to content

Instantly share code, notes, and snippets.

@CanOrhan
Created October 12, 2015 18:04
Show Gist options
  • Save CanOrhan/ba49ccc12144650084d7 to your computer and use it in GitHub Desktop.
Save CanOrhan/ba49ccc12144650084d7 to your computer and use it in GitHub Desktop.
for(int i = 0; i < 100; i++) {
String output = "";
if(i % 3 == 0) {
output += "Foo";
}
if(i % 5 == 0) {
output += "Bar";
}
if(output.equals("")) {
output += i;
}
System.println(output);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment