13 Replies Latest reply: Jan 3, 2011 4:07 PM by jschellSomeoneStoleMyAlias RSS

    StringTokenizer problem

    772790
      deleted

      Edited by: Oracle German on Dec 29, 2010 7:55 PM
        • 1. Re: StringTokenizer problem
          camickr
          1) What does "not working" mean.

          2) Read the "Welcome to the new home" posting found at the top of the forum so you can post readable code.

          3) For more help create a [url http://sscce.org]SSCCE, that demonstrates the incorrect behaviour.
          • 2. Re: StringTokenizer problem
            772790
            not working mean cannot display a value in combobox
            • 3. Re: StringTokenizer problem
              camickr
              Please read all three points! The last two haven't been resolved.
              • 4. Re: StringTokenizer problem
                772790
                What do you mean? i have just put
                !
                
                how rude! I guess you are not going to help! 
                
                anyway no need!                                                                                                                                                                                                                            
                • 5. Re: StringTokenizer problem
                  camickr
                  I guess you are not going to help!
                  It is you that doesn't want any help. You still haven't posted any readable/executable code.
                  • 6. Re: StringTokenizer problem
                    772790
                    you are crazy and bye
                    • 7. Re: StringTokenizer problem
                      camickr
                      You asked for help and are not willing to provide the necessary inforamation required to solve the problem.
                      • 8. Re: StringTokenizer problem
                        forumKid2
                        You should be using String.split anyhow, not StringTokenizer...
                        • 9. Re: StringTokenizer problem
                          772790
                          Hi forumkid2,

                          Yes but i am using Java version 1.3 so didn't have that functionality.

                          String.split() were from SE distribution since version 1.4 and above.

                          regards

                          Edited by: Oracle German on Dec 31, 2010 12:18 AM
                          • 10. Re: StringTokenizer problem
                            800330
                            Wow! 1.3... we migrated from 1.4 to 6 in February 2010. Just out of curiosity, can you point out one specific technicality preventing your system to move away from 1.3? I mean, I can understand higher ups wanting to keep a large system stable and making Java 1.3 a policy. But what would be th developers/engineering perspective here?

                            From [url http://www.oracle.com/technetwork/java/javase/download-142260.html]the download page:
                            On Windows, Linux, Solaris 9, and Solaris 10 J2SE 1.3.1 has completed the Sun End of Life (EOL) process. The EOL transition period was from Oct 25, 2004 until the General Availability (GA) of Java SE 6 on December 11th, 2006. With this notice, customers are strongly encouraged to migrate to the current release, Java SE 6. » Read More. A paid Java Vintage Support Offering is available for those customers who are interested in continuing to obtain support for the release. Please contact your Sun sales representative for details.

                            On Solaris 8 - J2SE 1.3.1 is continuing in the Sun End of Life (EOL) process. The EOL transition period began Oct 25, 2004 and will continue until the the end of the Solaris 8 five year Vintage Support Period. During this EOL transition period, the products will continue to be supported on Solaris 8 per Solaris 8 Vintage Patch Service in addition to existing customer support agreements. For information on how to download the JDK for use on Solaris 8 please see My Oracle Support Doc.

                            For developer needs, all products that have completed the EOL transition period will be moved to the Archive area.
                            • 11. Re: StringTokenizer problem
                              jschellSomeoneStoleMyAlias
                              forumKid2 wrote:
                              You should be using String.split anyhow, not StringTokenizer...
                              With no other context that is not an absolute truth.

                              StringTokenizer is quite apt for some problems.
                              • 12. Re: StringTokenizer problem
                                forumKid2
                                jschell wrote:
                                forumKid2 wrote:
                                You should be using String.split anyhow, not StringTokenizer...
                                With no other context that is not an absolute truth.

                                StringTokenizer is quite apt for some problems.
                                StringTokenizer is a legacy class for compatibility and it not encouraged to use in new code. For years now I haven't used StringTokenizer and there is nothing I have been unable to do with String.split(). I can't think of a reason why to use StringTokenizer regardless of situation...besides being on pre Java 1.4..which I can't think of any reason to be coding in pre Java 1.4 either :-)

                                Edited by: forumKid2 on Jan 3, 2011 11:10 AM
                                • 13. Re: StringTokenizer problem
                                  jschellSomeoneStoleMyAlias
                                  forumKid2 wrote:
                                  jschell wrote:
                                  forumKid2 wrote:
                                  You should be using String.split anyhow, not StringTokenizer...
                                  With no other context that is not an absolute truth.

                                  StringTokenizer is quite apt for some problems.
                                  StringTokenizer is a legacy class for compatibility and it not encouraged to use in new code.
                                  Don't believe everything you read - especially in the javadocs as they tend to not correct problems.

                                  And StreamTokenizer doesn't have the verbiage and is a bit more versatile as well. And it is better than split() for certain problems.
                                  For years now I haven't used StringTokenizer and there is nothing I have been unable to do with String.split().
                                  I haven't used any GUI classes for years and I probably have never used most of them.

                                  Pretty sure however that there are in fact problems that need them.
                                  I can't think of a reason why to use StringTokenizer regardless of situation...besides being on pre Java 1.4..which I can't think of any reason to be coding in pre Java 1.4 either :-)
                                  Any sort of solution that requires a simple parser. Especially with more complex syntax. A tokenizer, either the java one or hand rolled will be more efficient than split.