看板
[ java ]
討論串[問題] 建構子問題
共 7 篇文章
內容預覽:
public class test {. static int c;. public static void main(String[] args) {. int a = 1;. int b = 2;. //new test(a, b);. System.out.printf("兩數字相加 %d,
(還有65個字)
內容預覽:
程式碼: http://pastie.org/3592111. 剛剛看了林信良的書 內容有一段寫道:. "建構式是與類別名稱同名,無需宣告傳回型態的方法 ". 所以就自己寫了一段兩數相加程式碼 (c = a + b). 但是 c 輸出結果並不是我想要的, 請問我有哪邊寫錯嗎?. 在MyJava內 我
(還有87個字)