Class Arrays with Lejos?

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: roger, imaqine, 99jonathan

zerifa
New User
Posts: 3
Joined: Sat Oct 29, 2011 4:25 pm

Class Arrays with Lejos?

Postby zerifa » Sat Oct 29, 2011 4:36 pm

Hello!

I want to sort a list of numbers, for exemple :

double[] b = {0.9, 0.2, 0.5, 0.1, 0.2};
Arrays.sort(b);

Il a normal Java project, there is no problem. But in a Lejos problem, it doesn't work! Lejos seems ignore the class Arrays (java.util.*). Is it right?
How can i resolve my problem?

Thanks for your answer.

skoehler
leJOS Team Member
Posts: 1539
Joined: Thu Oct 30, 2008 4:54 pm

Re: Class Arrays with Lejos?

Postby skoehler » Sat Oct 29, 2011 5:04 pm

I'm afraid, the Arrays class is not yet available (or at least the sort methods are missing).

You might have to implement a sorting algorithm (bubble sort, quicksort, etc.) yourself, or maybe you copy/paste one from the internet.

zerifa
New User
Posts: 3
Joined: Sat Oct 29, 2011 4:25 pm

Re: Class Arrays with Lejos?

Postby zerifa » Sun Oct 30, 2011 6:06 pm

Thank you for your answer. It was helpfull. :-)


Return to “NXJ Software”

Who is online

Users browsing this forum: No registered users and 1 guest