// build an array data structure int[] a = new int[4]; a[0] = 21; a[1] = 22; a[3] = 24; a[4] = 25; // build an array data structure using an array literal int[] a = {21, 22, 23, 24}; // array literal // build a BTree using nested constructors BTree btree = new BTree("apple", null, new BTree("a", new BTree("b"), null)); // or build a BTree by adding sub trees BTree btree = new BTree("apple"); btree.addRightTree(new BTree("a")); btree.getRightTree().addLeftTree(new BTree("b")); // or build a BTree using a string from the binary tree language BTree btree = BuildBTree.buildBTree( "( apple () ( a b () ) )" ); // "tree literal"