求助
我是刚开始学java,还不太懂,请高手指点一下,我下面的程序我改了很久,就是编不过,不知道错在哪里.请高手们帮我看一下好吗!非常感谢
import java.io.*;
public class Compute
{
public static void main(String[] args)
{
String Str1="";
String Str2="";
try
{
InputStreamReader ins = new inputStreamReader(System.in);
BufferdReader br= new BufferdReader(ins);
Str1=br.readLine();
Str2=br.readLine();
}catch (IOException ie){}
if(Str1.indexof(".")==-1)
{
int y1=integer.parseInt(Str1);
int y2=integer.parseInt(Str2);
int y=y1+y2;
System.out.println("输入的两个数的和为:"+y);
}
else
{
Float f1= float.parseFloat(String Str1);
Float f2= float.parseFloat(String Str2);
Float f= f1+f2;
System.out.println("输入的两个数的和为:"+f);
}
}
}