首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

找不到变量,该怎么处理

2012-02-16 
找不到变量importjava.io.*publicclassChangeNum{publicstaticvoidchange(Integerx,Integery){Integertem

找不到变量
import   java.io.*;
public   class   ChangeNum{
public   static   void   change(Integer   x,Integer   y){
Integer   temp=x;
x=y;
y=temp;
}
public   static   void   main(String[]   args){
Integer   i1=null,j1=null;int   i=0,j=0;
try{
BufferedReader   in=new   BufferedReader(new   InputStreamReader(System.in));
String   inputLine=in.readLine();
i1=Integer.valueOf(inputLine);
i=il.intValue();
BufferedReader   in1=new   BufferedReader(new   InputStreamReader(System.in));
String   inputLine1=in1.readLine();
j1=Integer.valueOf(inputLine1);
j=jl.intValue();
}catch(Exception   exc){
System.out.println( "输入有误 ");
}
System.out.println( "交换之前i= "+i+ ",j= "+j);
change(i1,j1);
System.out.println( "交换之后i= "+i+ ",j= "+j);
}
}

[解决办法]
i=il.intValue(); // i = i1.intValue()
j=jl.intValue(); // j = j1.intValue()

这两个都是i1, j1, 1234的1,而不是lmn的l
[解决办法]
...

热点排行