Aktywne Wpisy
nocny-mirek +4
Co to jest lex tusk? Ktoś streści?
arinkao +28
Nie wierzę w to kuźwa, przed chwilą dostałam wiadomość na messengerze od klientki, taką normalną, oficjalną, dot. pracy. O 02:44, baba pyta czy da radę coś zrobić w środę. Czyli dziś └[⚆ᴥ⚆]┘
for(int y = 0; y < max_y; y++)
for(iny x = 0; x < max_x; x++)
// tablica[y][x] = ... jakieś operacje
The key here is to use Collections.max.
Returns the maximum element of the given collection, according to the natural ordering of its elements.
The natural ordering for Integer is from least-to-greatest, i.e. ascending. This makes it perfect to use here.
int largest = Collections.max(Arrays.asList(integer1, integer2, integer3,
integer4, integer5));
Alternatively, you could just build the List using a loop instead. See below for code that prompts the
i dzieki za porady i przejrze wasze porpozycje rowniez, czegos nowego sie naucze :)