Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Java

Package flexibility

While importing definitions, the user can alias a definition, or even a package.

Chart.sx

package zero.chart {
    public class Chart {
    }
}

ChartType.sx

package zero.chart {
    public enum ChartType {
        const BAR;
        const FLOW;
    }
}

Consumer

import cn = zero.chart.*;
//
const chartType : cn::ChartType = "flow";
//
const chart = new cn::Chart(chartType);