How do I print a string more than once in Java?
I expected to print the string repeatedly. Something like this, I tried to print “a” 40 times (meaning I tried to print a string 40 times on java.
so i tried System.out.println(“a”*40); but it didn’t work. What is the problem
New contributor
Hameed Ambali is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.