蓝
蓝色虾
Unregistered / Unconfirmed
GUEST, unregistred user!
//: Parcel3.java
//abstract class Contents{
interface Contents{
abstract public int value();
}
interface Destination{
String readLabel();
}
public class Parcel3{
private class PContents implements Contents{
private int i=11;
public int value(){return i;}
}
protected class PDestination implements Destination{
private String Label;
private PDestination(String whereto){
Label=whereto;
}
public String readLabel(){return Label;}
}
public Destination dest(String s){
return new PDestination(s);
}
public Contents cont(){
return new PContents();
}
}
class Test{
public static void main(String args[]){
Parcel3 p=new Parcel3();
Contents c=p.cont();
Destination d=p.dest("Sailing");
}
}
//abstract class Contents{
interface Contents{
abstract public int value();
}
interface Destination{
String readLabel();
}
public class Parcel3{
private class PContents implements Contents{
private int i=11;
public int value(){return i;}
}
protected class PDestination implements Destination{
private String Label;
private PDestination(String whereto){
Label=whereto;
}
public String readLabel(){return Label;}
}
public Destination dest(String s){
return new PDestination(s);
}
public Contents cont(){
return new PContents();
}
}
class Test{
public static void main(String args[]){
Parcel3 p=new Parcel3();
Contents c=p.cont();
Destination d=p.dest("Sailing");
}
}