Java selecting words from a string

后端 未结 3 1438
余生分开走
余生分开走 2020-12-19 16:01

HI Everyone. I\'m sorry for this embarrassingly newbie question but I cannot seem to figure out the command to do it. I\'m okay with python and had a script in jython that I

3条回答
  •  伪装坚强ぢ
    2020-12-19 16:26

    String foo = "java is really cool";
    String bar[] = foo.split(" ");
    

    this will separate all of the words into an array.

提交回复
热议问题