• Post Reply Bookmark Topic Watch Topic
  • New Topic

.length  RSS feed

 
John Valiant
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was able to get the correct output for the following

System.out.println(hercules.length());

Depending on the output. How can i replace the output with ,say, egg? So if the output is 3. How can i get eggeggegg?
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you tried so far? Post your code and describe the problem.
 
Roberto Perillo
Bartender
Posts: 2273
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Other than what Jk said, your question is too vague. What are you trying to achieve? What is the content of the "hercules" variable? Please TellTheDetails.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!