public class Parcel { double money = 100.0; class Contents { // Creating inner classes private double i = money; public double value() { return i; } } class Destination { // Creating inner classes private String label; Destination(String whereTo) { label = whereTo; } String readLabel() { return label; } } public void ship(String dest) { Contents c = new Contents(); System.out.println("$"+c.value()); Destination d = new Destination(dest); System.out.println(d.readLabel()); } public static void main(String[] args) { Parcel p = new Parcel(); p.ship("1234 MyAddress"); } }