I am new to java.
I am creating a school project in which I am using arrays.
My question is:
what is better - if i sort an array it also takes time in sorting.So will it be good to leave it unsorted for my small school project and while retrieving i will put some logic to retrive the desired array value.
It's better to keep it sorted if you think you will need sorted values at some later stage.
It would be better if you would paste your code here.