Created
January 30, 2018 08:39
-
-
Save warpgate3/4c82b486972dca06d1521c6bb93cae61 to your computer and use it in GitHub Desktop.
Repeat String in Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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