-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlastİndexOfMain.java
More file actions
44 lines (23 loc) · 943 Bytes
/
lastİndexOfMain.java
File metadata and controls
44 lines (23 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package Odev;
import java.util.Scanner;
public class lastİndexOfMain {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int[] AnaDizi = {74,85,102,99,101,85,56};
int ArananDeger = 85;
/*
// DİZİYİ KULLANICADAN ALMAK İSTERSEK ARALARINDA VİRGUL OLACAK SEKİLDE BU YORUM SATIRINDAKİ KODDAN ALABİLİRİZ.
System.out.print("Diziyi giriniz : ");
String girdi = input.nextLine();
String[] dizi = girdi.split(",", 30);
int[] AnaDizi = new int[dizi.length];
for (int counter = 0; counter < dizi.length; counter++) {
AnaDizi[counter] = Integer.parseInt(dizi[counter]);
}
System.out.print("Aranan degeri giriniz : ");
int ArananDeger = input.nextInt();
*/
lastIndexOfClass lastIndexOf=new lastIndexOfClass();
System.err.println(lastIndexOf.lastIndexOf(AnaDizi, ArananDeger));
}
}