i am trying to remova last tokenised string as i am mentioning in below sample....i have stored a data in a hashtable like this.....

Hashtable h = new Hashtable();
          h.put("111", "A/B/C/d");
          h.put("222", "A/B/C/D/e");
          h.put("333", "A/B/C/f");
          h.put("444", "A/B/C/D/E/g");
          h.put("555", "A/B/R");

in order to tokenise these strings and to remove last elements.......for example....here in first string "A/B/C/d".......i have to remove d ........how can i work it out........give me some idea........

Recommended Answers

All 2 Replies

Why don't you simply use String's split method and ignore the last resulting index?

thank u for helping me now it striked by using a if loop condition i tried and removed the last element with last index................

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.