- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.java
More file actions
Latest commit
17 lines (17 loc) · 464 Bytes
/
Copy pathtest.java
File metadata and controls
17 lines (17 loc) · 464 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
publicclasstest {
publicintread(int[] x,ints){
for (inti = 0; i <x.length; i++){
if(x[i] == s) returni+1;
}
return -1;
}
publicstaticvoidmain(String[] args){
testobj = newtest();
int[] x = {8,2,3,4,3};
// int[] y = obj.read(x);
// for(int i=0; i<y.length-1; i++){
// System.out.print(y[i]+ " ");
// }
System.out.println(obj.read(x,1));
}
}