hi i think this might Work
public class A1 {
static int a = 0;
public static void main(
String args[]) {
int s[] = {
18, 19, 28, 13, 5, 25, 35};
System.out.println(s.length);
for (int i = 0; i < s.length; i++) {
for (int j = (i + 1); j < (s.length - 1); j++) {
a = Math.min(s[i], s[j]);
}
}
System.out.println(a);
}
}