Initialization in java in try {} catch () {}, compilation error

In

Java development, a global variable is declared in the class and is not initialized, then the variable is initialized in try {}, and the member variable is called outside the try {} block. The error variable is not initialized, but the variable has indeed been assigned, so why report an error?

Mar.05,2021

String s;
        try {
            s="hello world";
        } catch (Exception e) {
            s="123";//
            e.printStackTrace();
        }
      System.out.println(s);//catchtrys
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e614f0-44653.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e614f0-44653.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?