import java.util.Scanner;
public class diziler {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
int ogrenci;
System.out.println("öğrenci sayısını girin");
ogrenci = input.nextInt();
int array[] = new int [ogrenci];
String adi[] = new String [ogrenci];
String soyadi[] = new String [ogrenci];
int not [] = new int [ogrenci];
for (int i = 0; i<ogrenci; i++) {
System.out.println("Öğrencinin Adı:");
adi[i] = input.next();
System.out.println("Öğrencinin SoyAdı:");
soyadi[i] = input.next();
System.out.println("Öğrencinin Notu:");
not[i] = input.nextInt();
System.out.println();
}
for (int i = 0; i<ogrenci; i++) {
System.out.println(adi[i]+ " " +soyadi[i]+ " " +not[i]);
}
}
}
esas olayım şu satırda
for (int i = 0; i<ogrenci; i++) {
System.out.println(adi[i]+ " " +soyadi[i]+ " " +not[i]);
burada not[i] kısmı büyük nottan küçüğe sıralanacak

teşekkürler o komutu biliyordum ancak nota dair isim bilgileri nasıl bastırılacak onu bulamadım, yani notları sıralayabiliyorum ancak o nota dair isim bilgisi nasıl çekilecek


Array yerine bu tür kompleks yapılarda Collections kullanman daha mantıklı olabilir.


bi sort metodu kullan. not[i] gecen yerlerde adi[i], soyadi[i] da kullan ayni indexte kalsinlar hep. en basiti bu duruyor.


vaktim vardi yaptim :) bunu son fordan oncesine yapistir.
for (int j = 0; j<not.length; j++) {
for (int k = 0; k < not.length; k++){
if (not[j] < not[k]) {
int buffer = not[j];
not[j] = not[k];
not[k] = buffer;
String buffer1 = adi[j];
adi[j] = adi[k];
adi[k] = buffer1;
buffer1 = soyadi[j];
soyadi[j] = soyadi[k];
soyadi[k] = buffer1;
}
}
}
