[java]代码库
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();
String []str = s.split(" ");
int i, j;
for(i = 0; i < str.length; i++) {
if(i != 0)
System.out.print(" ");
if(str[i].equals("true") || str[i].equals("false")) {
System.out.print("boolean");
i++;
System.out.print(" ");
}
int flag = 0;
for(j = 0; j < str[i].length(); j++) {
if(str[i].charAt(j) == '.')
flag = 1;
else if(str[i].charAt(j)>='A' && str[i].charAt(j)<='z')
flag = 2;
}
if(flag == 1)
System.out.print("double");
else if(flag == 2)
System.out.print("String");
else
System.out.print("int");
}
scan.close();
}
}