ArcMedia JavaScript Source Code 3000 Pro (gar448) for PC Logo

Related Topics:

Posted on Apr 07, 2009
Answered by a Fixya Expert

Trustworthy Expert Solutions

At Fixya.com, our trusted experts are meticulously vetted and possess extensive experience in their respective fields. Backed by a community of knowledgeable professionals, our platform ensures that the solutions provided are thoroughly researched and validated.

View Our Top Experts

Source code of a program

I need source code of "how to reverse a string in java without reversing the words(e.g. reverse it "Tech Support Problem" like "Problem Support Tech")". I know the procedure but cant write the code. So please send me the code.

1 Answer

Anonymous

Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Sergeant:

An expert that has over 500 points.

Champion:

An expert who has answered 200 questions.

  • Expert 219 Answers
  • Posted on Apr 08, 2009
Anonymous
Expert
Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Sergeant:

An expert that has over 500 points.

Champion:

An expert who has answered 200 questions.

Joined: Mar 23, 2009
Answers
219
Questions
0
Helped
60853
Points
554

Import java.util.*;
public class StringReverse {
  public static void main(String[] argv) {
    //+
    String s = "Support Tech Problem";

    // Put it in the stack frontwards
    Stack myStack = new Stack();
    StringTokenizer st = new StringTokenizer(s);
    while (st.hasMoreTokens()) myStack.push(st.nextElement());

    // Print the stack backwards
    System.out.print('"' + s + '"' + " backwards by word is:\n\t\"");
    while (!myStack.empty()) { 
      System.out.print(myStack.pop());
      System.out.print(' ');
    }
    System.out.println('"');
    //-
  }
}

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

232 views

Ask a Question

Usually answered in minutes!

Top ArcMedia Computers & Internet Experts

Rob Hill
Rob Hill

Level 3 Expert

1483 Answers

Anonymous

Level 2 Expert

214 Answers

Dax Estorioso
Dax Estorioso

Level 2 Expert

162 Answers

Are you an ArcMedia Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...