下列為Python程式的物件導向概念:. class c1: def __init__(self):. self.i = 0. def add(self):. self.i += 2. c = c1(). c.add(). print(c.i).
確定! 回上一頁