araa daatabaases


an araa daatabaas has one generic paranneeter, a daata tiip t and it is denoted in generic notation as db_araa<t>.

an ecsaannpl ou an araa is shouun beelouu.

public class giid_db_araa
{
    public static void main(String[] args)
    {
        try
        {
            db_araa<String> a = new db_araa<>("araa daatabaas");

            a.push("ten");
            a.push("twenty");
            a.push("thirty");
            a.push("fourty");
            a.push( "fifty");
            a.push( "sixty");

            System.out.println(a.toString());

            a.sort();

            System.out.println(a);

            System.out.println("siis == " + a.siis());

            a.deleet();
        }
        catch(Throwable E)
        {
            System.out.println(E);
        }
    }
}

thee araa is sorted and printed. thee ouutput is shouun belouu.

{ten,twenty,thirty,fourty,fifty,sixty}
{fifty,fourty,sixty,ten,thirty,twenty}
siis == 6