Results 1 to 4 of 4
Thread: I'm New to Methods
- 04-29-2011, 03:29 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 2
- Rep Power
- 0
I'm New to Methods
Ok, I'm new to Java. About 3 weeks new. I'm trying to practice methods by making a mock up of an older style of RPG. I'm trying to have a user input a string; depending on what the user types, it will call a different method I'm not sure how to execute it correctly. I'm not getting any errors, so I'm sure it's all in the way it was written. I put part of my code in there. Can someone please help me. Thank you.
- 04-29-2011, 03:35 AM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
Please post your code and use code tags
[code]
YOUR CODE HERE
[/code]
It will probably just be a series of if else clauses
Java Code:if(string.equals("a")){ call method one } else{ call method two }Last edited by sunde887; 04-29-2011 at 03:39 AM.
- 04-29-2011, 03:44 AM #3
Member
- Join Date
- Apr 2011
- Posts
- 2
- Rep Power
- 0
Oh my gosh, Thank you so much man. That fixed my problem completely. You're a life saver!
- 04-29-2011, 03:45 AM #4
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
You're welcome, please mark your thread solved with the thread tools at the top.
Similar Threads
-
Trouble with static methods and boolean equals() methods with classes
By dreamingofgreen in forum New To JavaReplies: 8Last Post: 04-16-2012, 11:00 PM -
ugh need some serious methods help
By jjth39347 in forum New To JavaReplies: 32Last Post: 04-01-2011, 02:43 AM -
Methods
By soccer_kid_6 in forum New To JavaReplies: 15Last Post: 02-27-2010, 11:49 AM -
methods
By blueduiker in forum New To JavaReplies: 12Last Post: 02-09-2010, 03:50 PM -
How to get methods to see variables in other methods
By ejs7597 in forum New To JavaReplies: 4Last Post: 04-03-2009, 06:36 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks