JAva:単語置換:1つの文字列の一部の単語を特別な語彙で置換する
package com.ethjava;
import java.util.ArrayList;
import java.util.Scanner;
public class wordswap {
public static void main(String[] args) {
// , Arraylist word , ,
Scanner sc = new Scanner(System.in);
ArrayList arrList = new ArrayList();
while(sc.hasNext()) {
String str = sc.nextLine();
String[] word=str.split(" ");
for(int i=0;i
You want someone to help you
You
I
YOUをIに き える
I want someone to help you