我收到此錯誤消息:The value of the local variable chaine2 is not used
。本地變量chaine2的值未使用
代碼:
package com.example.Projet_java;
public class MyFirstClass
{
public static void main(String[] args) {
{ String chaine = new String("HELLO"),
chaine2 = new String();
chaine2 = chaine.toLowerCase();
}
}
}
我試圖按照以下螺紋 Java error "Value of local variable is not used" 但沒有成功。
有人知道我該如何修復它嗎?
這是您的IDE提供的一個指標,通知您在這種情況下您可能擁有無用變量'chaine2'。順便說一句,這不是一個編譯錯誤。 – Mik378
你是如何閱讀該鏈接並不理解你的問題的? – syb0rg
我從來沒有見過更可笑的支架放置,並且,不管你信不信,它都是*不是偶然的*。 –