Skip to content

Instantly share code, notes, and snippets.

@mayuroks
Created August 15, 2018 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mayuroks/f7ec75981e4419274faebe73dda8e9c0 to your computer and use it in GitHub Desktop.
Save mayuroks/f7ec75981e4419274faebe73dda8e9c0 to your computer and use it in GitHub Desktop.
public class Todo {
String userId;
int id;
String title;
boolean completed;
public String getFormattedInfo() {
StringBuilder builder = new StringBuilder();
builder.append("Title: " + title + "\n\n");
builder.append("UserId: " + userId + "\n");
builder.append("Id: " + id + "\n");
builder.append("Completed: " + completed + "\n");
return new String(builder);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment