Possible Duplicate:
Can I multiply strings in java to repeat sequences?
In Python, we can easily multiply the stings.
count = 10
print '*' * count
Is there any similar option available in Java?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How about this??
System.out.println(String.format("%10s", "").replace(' ', '*'));This gives me output as
**********.I believe this is what you want…
Update 1
Good Luck!!!