Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次の文字列を {"George", "Washington"} の配列に分割するにはどうすればよいですか?
String arr = "George\nWashington";
String[] array = arr.split("\\n");
これを試して:
String arr[] = "George\nWashington".split("\\n"));