arrays splitting strings java -


I'm sure this is a fairly easy question for anyone, but I think it's the best way to do it as a relative. Tell me the beginners.

I am dividing a large file (string temporary) into approximately 100 strings and setting it as an array, but I do not know the exact number of strings.

  string [] idf = temp.split ("==========="); String class 1 = IDF [0]; String class 2 = IDF [1]; String Class 3 = IDF [1]; e.t.c.  

What's the best way to ensure that I can split all the stars and store them in an array?

Any suggestions or hints will be most thanked

You can do this Are:

  string list = "hey, how are you"; String [] strarray = list.split ("\\ s +"); (String str: stray) {System.out.print (str); }  

Comments

Popular posts from this blog

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

sql server ce - Is there some way to make sqlce3.5 and 4.0 co-exist in the C# project -