Java: Extending inner classes
I am trying to understand extending inner classes in Java. I have read around but nothing I found quite answers my question. So here goes... I have... public class Pie{ protected Slice[] slices; // Pie constructor public Pie(int n){ sliceGenerator(n) } private void sliceGenerator(int n){ slices = new Slice[n]; final float sweepAngle = 360.0f/(float)n; float startAngle = 0; for (int i=0;i<n;i++){ slices[i] = new Slice(startAngle); startAngle += sweepAngle; } } @Override public String toString(){ for (Slice s:slices){ s.toString(); } } // Inner class... public class Slice{ public Slice(float