Do Comparators Work In Android?

Since the Comparator class is part of the Java programming language, Android should do too. However, my experience with using them seem to indicate that it may not work all the time. Even I think it does not work in Android.

Has anyone else experienced this? Or even used it and worked? I made a Comparator class and ran it in Java’s runtime environment. It worked correctly. When I used the same class and sorted an ArrayList object in the Android emulator, it did not work. The sorting was different.

Now, I have no idea why. I always thought that there was something wrong with my custom Comparator class because the output in the Android emulator was always wrong. When I ran it in the JRE (since it was faster), the output was correct.

There should not be any rules to using comparators in the Android emulator. How they are used should be the same as when used in the Java Runtime Environment.

Please share your thoughts. Your inputs are highly appreciated and may help me know the limitations and what ifs when using a Comparator class in an Android emulator.

Donations appreciated. Every little $ helps. Or click Google +1. Or play the short video on the upper right of this page.

A Mystery At Work

One thing that always baffles me is that barely does a software developer get a lot of love. If he does get some, then he is extremely lucky. Let us see now … software developers need powerful units to develop their tasks. By powerful units, I mean computers with the latest specifications. And I do not mean it for gaming purposes . However, it is quite often that people whose jobs require fast and powerful desktops for their work get pathetic and slow ones instead. Whereas people who have non-software development type of job specs get them. and ironically, only use Microsoft Office related applications 90% of the time.

If they so as much can justify that they need powerful laptops (get this, they are not even desktops), how much more for people involved with software development and say, perhaps quality assurance as well? Or perhaps you might want to request the latest laptop of a Macbook (I think the PRO has a powerful set of feauires than the ordinary Macbook) but you are only offered an older model because your company is not planning to buy any new ones for you. Then, you find out later on, some not even higher-up staff has one and all that person does has nothing to do with I.T development and/or maintenance related work. Hmmm, I guess the only thing I can comment regarding this is … That’s Life! haha. tsk. Life is cruel.

Donations appreciated. Every little $ helps. Or click Google +1. Or play the short video on the upper right of this page.

Related Posts Plugin for WordPress, Blogger...