Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Methods and Strings  RSS feed

 
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.
 
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?
 
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.
 
Marshal
Posts: 58421
178
  • 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!