public class App {

    public static void main(String[] args) {
        String str = "123\\n456\\n789\\n";      //字符串"123\n456\n789\n"
        String[] strs = str.split("\\\\n");
        for (String s : strs) {
            System.out.println(s);              //123   456 789
        }
    }

}

 

相关文章:

  • 2022-12-23
  • 2022-02-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
猜你喜欢
  • 2021-07-25
  • 2022-12-23
  • 2021-10-17
  • 2021-05-23
  • 2021-09-13
  • 2021-08-21
  • 2022-12-23
相关资源
相似解决方案