if(objectInputStream.available()!=0){
while (objectInputStream.available() >0) {
p = (ControlPoints) objectInputStream.readObject();
System.out.println("ioheorg"+objectInputStream.available());
}
}else System.out.println("ne if main 101");
if (p!=null){
System.out.println("Tuta "+p.getPoints().get(0).getX());
}
public static ArrayList<String> list = new ArrayList<>();
public static void main(String[] args) throws IOException {
// ArrayList<String> list = new ArrayList<>();
String filename ="";
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
while (!(filename= reader.readLine()).equals("exit")){
list.add(filename);
// System.out.println(Arrays.toString(filename.split(".part")));
}
System.out.println(list);
list = (ArrayList<String>) list.stream().sorted((String s1, String s2)->{
var st1 = s1.split(".part");
System.out.println(Arrays.toString(st1));
var st2 =s2.split(".part");
System.out.println(Arrays.toString(st2));
var n2 =Integer.parseInt(st2[st2.length-1]);
var n1 = Integer.parseInt(st1[st1.length-1]);
return n2 - n1;
}).collect(Collectors.toList());
System.out.println(list);
}
public static ArrayList<String> list = new ArrayList<>();
public static void main(String[] args) throws IOException {
// ArrayList<String> list = new ArrayList<>();
String filename ="";
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
while (!(filename= reader.readLine()).equals("exit")){
list.add(filename);
// System.out.println(Arrays.toString(filename.split(".part")));
}
System.out.println(list);
list = (ArrayList<String>) list.stream().sorted((String s1, String s2)->{
var st1 = s1.split(".part");
System.out.println(Arrays.toString(st1));
var st2 =s2.split(".part");
System.out.println(Arrays.toString(st2));
var n2 =Integer.parseInt(st2[st2.length-1]);
var n1 = Integer.parseInt(st1[st1.length-1]);
return n2 - n1;
}).collect(Collectors.toList());
System.out.println(list);
}