找不到变量
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
------解决方案--------------------...