Click to See Complete Forum and Search --> : First Assignment! HELP!


i_suck_help
09-14-2003, 01:07 AM
Hi,

I am stuck. I cannot get anywhere on the following program. I need to writea Java application program that will read a line of text as input and two substrings (substring1 and substring2). The program will then output the line of text with the first substring1 found in the input switched position with the last substring2 found in the input. For example, the screen could show like this:



Do you want me to process your text? Y
Please input the text: yes, I asked you a I question
Please input the first substring: I
Please input the second substring: you

This is your text after processing: yes, you asked I a I question


Anyone have any ideas?

THANKS!

Khalid Ali
09-14-2003, 07:51 AM
if you are asking a question regarding Java,thenits the wrong forum...If you are asking a question in JavaScript, then JS can not take inputs the way you mentioned it has to be a form field or some other prompt etc..

for Java question

forums.java.sun.com