Sort Arraylist Java Without Using Sort In C