我有一個關於使用對象的問題... 我有一個叫做Area的類,它包含幾個方法。我想在另一個創建Area對象的類中訪問這些方法。 public class calcAreaObj {
Area areaObj = new Area();
public static void main(String[] args){
areaObj.area(2,3,4);
}
}
爲什
這是一個特定於我們接管的自定義編寫的CMS的問題。我們將服務器和PHP版本從5.3.8更改爲5.4.1。 從那時起,我們無法獲得CMS工作,收到此錯誤: Strict Standards: Non-static method Vox_Model_Setting::getMapper() should not be called statically, assuming $this from inc
在editContact的「[Contact.getName()]」我得到的錯誤: 不能使從類型 聯繫的靜態引用非靜態方法GetName() 類型不匹配:不能從String轉換爲int 這是爲什麼,我該如何解決這個問題?謝謝! public class ContactList
{
private final int MAX_NUMBER_OF_CONTACTS = 100;
private
這個問題是基於我以前的問題。 How to add a "cheat" function to a Java mastermind game 我在程序中添加了作弊功能,但由於「無法靜態引用非靜態方法」(舊代碼有效,您可以通過我發佈的鏈接檢查它)無法編譯。這裏是我的新代碼: import java.util.*;
public class mm {
static int[] rando