You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Learn/LearnJava/Jb21_DataTransmit.java

30 lines
456 B

public class Jb21_DataTransmit
{
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public static void main(String[] args)
{
int x = 1;
show(x);
System.out.println(x); //<2F><><EFBFBD><EFBFBD>1
}
public static void show(int x)
{
x = 2;
}
}
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
class Demo
{
int x = 1;
public static void main(String[] args)
{
Demo data = new Demo();
data.x = 3;
show(data);
System.out.println(data.x); //<2F><><EFBFBD><EFBFBD>Ϊ2
}
public static void show(Demo data)
{
data.x = 2;
}
}