[java]代码库
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();//以换行为结束
String[] s1 = s.split("\\s+");//以空格分割字符串
int i = 0, j = 0, k = 0;
while( k < s1.length)
{
if( k != 0 )
System.out.print(" ");
if(s1[k].contains("true") || s1[k].contains("false"))
System.out.print("boolean");
else if(s1[k].charAt(0) >= 'A' && s1[k].charAt(0) <= 'Z')
System.out.print("String");
else if( s1[k].charAt(0) >= 'a' && s1[k].charAt(0) <= 'z')
System.out.print("String");
else if( s1[k].contains("."))
System.out.print("double");
else
System.out.print("int");
k++;
}
}
}