I got to finish this project by tomorrow, but I really don't know how to. If I don't finish it by Friday, I will be doomed:( I don't understand java AT ALL, I AM A JAVA IDIOT. Please help me finish the project! your help will be appreciated!
The project is Reversewords.
We have to design a function that will take a string of words and hand it back to the caller with all the words reversed (E.g. "i like you" becomes "you like i"). Use two nested for loops in the routine to get your result. Afterwards, in the main, continue asking the user for a sentence- or just type return to end (can use while loop in main).
this is what I got so far.
public class Reversewords
public static void main(String  args)
Scanner inputreader=new Scanner(System.in);
int 0 = sen.getLength()-1;
int c = 0;
for (c=orj; c>0; c--)
String sb = sen.substring(c+1,ori+1);
ori = c;
When posting code, make sure you use the CODE tags to preserve formatting.
The directions tell you pretty much exactly what to do. Where exactly are you stuck on them? What about them don't you understand?
First off, clean up the syntax errors. The compiler should tell you exactly what's wrong with that. Hint- you can't have statements such as for loops and if statements outside of a method.
After that, read the directions over and over again. Hint- The directions call for nested for loops.
Cross-posted in yahoo. locking.