Results 1 to 14 of 14
- 01-31-2013, 04:57 PM #1
Member
- Join Date
- Jan 2013
- Posts
- 6
- Rep Power
- 0
- 01-31-2013, 04:58 PM #2
Re: How to reverse a string in Java without using SubString
This sounds like homework, and we aren't just going to do your assignment for you.
What have you tried? Where are you stuck?How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 01-31-2013, 05:04 PM #3
Member
- Join Date
- Jan 2013
- Posts
- 6
- Rep Power
- 0
Re: How to reverse a string in Java without using SubString
Its a workseet yet, but we have recieved incoffiient help and i need an idea on how it works. if i wanted the awnsers i would of asked for them
- 01-31-2013, 05:14 PM #4
Re: How to reverse a string in Java without using SubString
Right, okay, so what have you tried? Have you looked at the API and basic tutorials at all? Where exactly are you stuck?
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 01-31-2013, 05:22 PM #5
Member
- Join Date
- Jan 2013
- Posts
- 6
- Rep Power
- 0
Re: How to reverse a string in Java without using SubString
I have been using a while loop, i have been trying to use acharAt but nothign seems to be working atm
- 01-31-2013, 05:24 PM #6
Re: How to reverse a string in Java without using SubString
What exactly do you mean when you say it isn't working? What do you expect it to do? What does it do instead? Have you tried stepping through it with a debugger, or at least adding some print statements to figure out what's going on?
Note: it'll be a lot easier to help you if you ask a specific question ("I'm trying to accomplish X, so I'm doing Y, expected Z, but got ABC instead") and post an SSCCE showing what you're trying to do.How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 01-31-2013, 05:33 PM #7
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: How to reverse a string in Java without using SubString
That implies you have written some code that doesn't do what you want it to.
Posting that code, wrapping it in [code] tags [/code] so it appears properly, and telling us any errors/exceptions you are getting (in full) and where will give us a chance to actually explain where you are going wrong.
It shows us that you have actually done some work on this, and shows us where you are having problems. We try and avoid supplying full solutions to these sorts of problems.Please do not ask for code as refusal often offends.
- 01-31-2013, 06:20 PM #8
Member
- Join Date
- Jan 2013
- Posts
- 6
- Rep Power
- 0
Re: How to reverse a string in Java without using SubString
public class reverse {
public static void main(String[] args) {
//String s = "Syndicate";
//r = s.charAt(1);
char reverse;
// String s = " Syndicate ";
// s.charAt[1];
String s = " Syndicate ";
reverse = .charAt(2);
System.out.println(s);
}
}
Thsi si what i have done so far. Keep in mind i am an amateur programmer
- 01-31-2013, 06:23 PM #9
Re: How to reverse a string in Java without using SubString
You forgot the code tags.
And what does this code do? Does it compile?How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 01-31-2013, 06:27 PM #10
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: How to reverse a string in Java without using SubString
You've missed out virtually everything I asked for (apart from the code).
No code tags, no errors, no description of where you are stuck.Please do not ask for code as refusal often offends.
- 01-31-2013, 06:29 PM #11
Re: How to reverse a string in Java without using SubString
You were told about the code tags. Edit your post to include them.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 01-31-2013, 06:42 PM #12
Member
- Join Date
- Jan 2013
- Posts
- 6
- Rep Power
- 0
Re: How to reverse a string in Java without using SubString
What are where can i find teh code tags
- 01-31-2013, 06:44 PM #13
Member
- Join Date
- Jan 2013
- Posts
- 6
- Rep Power
- 0
Re: How to reverse a string in Java without using SubString
This is all i have done, i dont know what to do next. And as far as errors there are no errors i have tried using a charAt but get no results
- 01-31-2013, 06:55 PM #14
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,385
- Blog Entries
- 7
- Rep Power
- 17
Re: How to reverse a string in Java without using SubString
When people rob a bank they get a penalty; when banks rob people they get a bonus.
Similar Threads
-
how to reverse string without using string reverse or array ?
By funkygarzon in forum New To JavaReplies: 10Last Post: 03-15-2012, 10:46 AM -
A string and substring problem
By calnastic in forum New To JavaReplies: 4Last Post: 07-18-2011, 09:02 PM -
How do I remove a substring from a string?
By Unnel in forum New To JavaReplies: 16Last Post: 07-11-2011, 11:56 AM -
Reverse a string not using the substring method
By kathyla18 in forum New To JavaReplies: 17Last Post: 04-08-2009, 04:08 AM -
String substring function
By ravian in forum New To JavaReplies: 6Last Post: 01-02-2008, 07:35 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks