• Post Reply Bookmark Topic Watch Topic
  • New Topic

Methods and Strings  RSS feed

 
Dominic Griffin
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I write method that accepts a string object as an argument? I am conused. Please help.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You put a String parameter in the parameter list--have you written methods that take other types of parameters?
 
Muhammad Khojaye
Ranch Hand
Posts: 449
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dominic Griffin wrote:How do I write method that accepts a string object as an argument? I am conused. Please help.


What problem you are facing while declaring such method. I am sure, you have implements many other methods before.
 
Campbell Ritchie
Marshal
Posts: 56518
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Dominic Griffin
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for the responses. Through your input I have figured how to write the method. But I may need help later on formulating the method so it would display the string backwards.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!