- 博客(2)
- 收藏
- 关注
原创 第3章面向对象程序设计
3.1类和对象类 类的定义方式;[public] class classname [entends classname] [imimplements interfacelist]{/* 成员变量列表;成员方法列表;*/}classname类名 , extends指出该类以每个类为基类 implements指出该类有一个或多个接口编程技巧:有什么-------
2006-03-30 21:03:00 683
原创 有关methed方法的使用
class CRectagle{ int width; int height; int area()//定义函数成员 area(),计算面积 { return width*height; } int perimiter()//定义函数成员 用来计算周长 { return 2*(width+height); } }public class app7_3 { public static
2006-03-30 20:07:00 1025
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人