need help
package com.codegym.task.task15.task1519;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
/*
Different methods for different types
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
while(true){
String a = reader.readLine();
byte y = Byte.parseByte(a);
Integer p = Integer.parseInt(a);
if(a.equals("exit")){
break;
}
else if(a.contains(".")){
Double x = Double.parseDouble(a);
print(x);
}
else if(y>0 && y<128){
print(y);
}
else if(p<=0 && p>=128){
print(p);
}
else print(a);
}
//write your code here
}
public static void print(Double value) {
System.out.println("This is a Double. Value: " + value);
}
public static void print(String value) {
System.out.println("This is a String. Value: " + value);
}
public static void print(short value) {
System.out.println("This is a short. Value: " + value);
}
public static void print(Integer value) {
System.out.println("This is an Integer. Value: " + value);
}
}