package com.sort; import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class Test1 {     public static void main(String[] args) {          @SuppressWarnings("resource")         Scanner scan = new Scanner(System.in);         String str = scan.nextLine();         ArrayList arr = new ArrayList<>();         for(int i = 0 ; i < str.length() ; i ++){             if(!Character.isDigit(str.charAt(i))){                 String s = str.replace(str.charAt(i), ' ');                 str = s;             }         }         String[] ss = str.split(" ");         for(String sd : ss){             if(sd!=null){                 arr.add(sd);             }         }         Collections.sort(arr);         System.out.println(arr.get(arr.size()-1));     } } 第一题
点赞 1

相关推荐

03-11 23:33
已编辑
曲阜师范大学 后端工程师
牛客68808588...:果真开发过12306购票系统吗,这不是一眼就被看穿了
点赞 评论 收藏
分享
正在热议
更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务