摘要:
String indexOf()方法返回字符串中指定字符/子字符串首次出现的索引,如果找不到指定的字符/字符串,则返回 -1 但如果传递空字符串,则indexOf()会返回0(在第一个位置找到),这是因为空字符串是每个子字符串的子集 阅读全文
摘要:
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String year = "2023"; String month = "11"; int len = month.length(); 阅读全文