public class Test {public static void main(String[] args) {Book bookA = new Book("JAVA",79.8);Book bookB = (Book) bookA.clone();}}請(qǐng)問(wèn)我在輸出克隆對(duì)象時(shí),向下轉(zhuǎn)型時(shí)紅色的字條報(bào)錯(cuò)了,說(shuō)要加上throws ecception是為什么呢?剛學(xué)java不久小白一枚,希望各位老哥幫忙解答一下
JAVA throws exception
滄海一幻覺(jué)
2018-08-13 06:09:32