forked from teddyzhang1976/ThinkInJava4thSampleCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParcel7.java
More file actions
16 lines (15 loc) · 472 Bytes
/
Parcel7.java
File metadata and controls
16 lines (15 loc) · 472 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//: innerclasses/Parcel7.java
package innerclasses; /* Added by Eclipse.py */
// Returning an instance of an anonymous inner class.
public class Parcel7 {
public Contents contents() {
return new Contents() { // Insert a class definition
private int i = 11;
public int value() { return i; }
}; // Semicolon required in this case
}
public static void main(String[] args) {
Parcel7 p = new Parcel7();
Contents c = p.contents();
}
} ///:~