2016-04-26 28 views

回答

0

製作一個toString方法並自定義您想要構建字符串的方式。

這樣的一個例子可以是下列

public String toString() { 
    String s = ""; 
`//building the string you want to return like so 's = //How you want it. '` 

    return s; 

}

+0

謝謝我得到它 –

+0

打這個檢查,如果這回答了你的問題,你是受歡迎的。 – CodeNoob

相關問題