![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/233511903936128.png?x-oss-process=image/auto-orient,1/resize,w_320,m_lfit)
import java.util.Scanner;
import System;
public class test {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
sc.close();
String[] strs = str.split(" ");
for (int i = 0; i < strs.length; i++) {
try {
Integer tmp = Integer.valueOf(strs[i]);
if (tmp >= 0 && tmp <= 255) {
java.lang.System.out.println(strs[i] + " can be converted into a type byte!");
} else {
java.lang.System.out.println(strs[i] + " cannot be converted into a type byte!");
}
} catch (Exception e) {
java.lang.System.out.println(strs[i] + " cannot be converted into a type byte!");
}
try {
Short tmp = Short.parseShort(strs[i]);
java.lang.System.out.println(strs[i] + " can be converted into a type short!");
} catch (Exception e) {
java.lang.System.out.println(strs[i] + " cannot be converted into a type short!");
}
try {
Integer tmp = Integer.valueOf(strs[i]);
java.lang.System.out.println(strs[i] + " can be converted into a type int!");
} catch (Exception e) {
java.lang.System.out.println(strs[i] + " cannot be converted into a type int!");
}
try {
Float tmp = Float.parseFloat(strs[i]);
java.lang.System.out.println(strs[i] + " can be converted into a type float!");
} catch (Exception e) {
java.lang.System.out.println(strs[i] + " cannot be converted into a type float!");
}
try {
Double tmp = Double.valueOf(strs[i]);
java.lang.System.out.println(strs[i] + " can be converted into a type double!");
} catch (Exception e) {
java.lang.System.out.println(strs[i] + " cannot be converted into a type double!");
}
}
}
}