any one can explain please
package com.codegym.task.task15.task1519;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Different methods for different types
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String s = reader.readLine();
int i = Integer.parseInt(s);
while (!(s.equals("exit"))){
try {
if (s.contains(".")) {
print(Double.parseDouble(s));
}
else if (i > 0 && i < 128) {
print((short) i);
}
else {
print(i);
}
}
catch (Exception e) {
print((String) s);
}
}
reader.close();
}
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);
}
}