MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / Parcel8

Class Parcel8

innerclasses/Parcel8.java:7–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5// Calling the base-class constructor
6
7public class Parcel8 {
8 public Wrapping wrapping(int x) {
9 // Base constructor call:
10 return new Wrapping(x) { // [1]
11 @Override public int value() {
12 return super.value() * 47;
13 }
14 }; // [2]
15 }
16 public static void main(String[] args) {
17 Parcel8 p = new Parcel8();
18 Wrapping w = p.wrapping(10);
19 }
20}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected