Skip to content

Instantly share code, notes, and snippets.

@pnuz3n
pnuz3n / MixinsExample.java
Last active September 14, 2022 16:25
Simple try-out for DCI programming style (basically mixins) using Java 8, virtual default methods and dynamic proxy.
// Idea about simple DCI (data, context, interaction) using Java 8.
// Approach will force mixins to Java using virtual default methods
// and dynamic proxy. To keep it short there is no context object
// like DCI dictates.
//
// Run using
// javac MixinsExample.java; java MixinsExample
//
// Panu Wetterstrand <panu.wetterstrand@iki.fi>
import java.util.Arrays;
import java.util.Comparator;
public class Main {
public static void main(String[] args) {
String Name[][] = {
{"prakash", "kumar"},
{"raj", "kappor"},
{"vinod", "bhart"},
{"yraj", "tkappor"},