public class Parcel6
{
private void internalTracking(boolean b)
{
if(b)
{
class TrackingSlip
{
private String id;
TrackingSlip(String s)
{
id =s;
}
String getSlip()
{
return id;
}
}
TrackingSlip ts = new TrackingSlip("slip");
String s = ts.getSlip();
}
}
public void track()
{
internalTracking(true);
}
public static void main(String args[])
{
Parcel6 p = new Parcel6();
p.track();
}
}
作用域里面的内部类
最新推荐文章于 2022-12-14 18:02:10 发布