Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Java singleton mode

Shulou Source: shulou.com Published: 2022-06-03 04:35:30 11月25日 Update

/ / Private construction method

Private ConfigProfileMan () {

GeneralTaskList = new ArrayList ()

}

Private instance creation method

Private static ConfigProfileMan getInstance () {

If (configProfileMan = = null) {

ConfigProfileMan = new ConfigProfileMan ()

}

Return configProfileMan

}

/ / call the method

Public static void loadProfile () {

Try {

ConfigProfileMan.getInstance () .load ()

} catch (Exception e) {

Logger.error ("ConfigProfileMan-- > loadProfile ()")

}

}

Tags: Method private instance mode Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB OPPO Reno Redmi Microsoft Shulou Tech Info