Skip to content

Instantly share code, notes, and snippets.

@warpgate3
Created January 30, 2018 08:39
Show Gist options
  • Save warpgate3/4c82b486972dca06d1521c6bb93cae61 to your computer and use it in GitHub Desktop.
Save warpgate3/4c82b486972dca06d1521c6bb93cae61 to your computer and use it in GitHub Desktop.
Repeat String in Java
String repeatTxt = String.join("", Collections.nCopies(10, "*"));
//output: **********
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment