变量 Variable
常量 Constant
//C++ int a; //Variable const int b; //Constant
//Java private Integer a; //Variable private static final b; //Constant private static const c; //保留字,不推荐使用
函数 Function
方法 Method
声明 Declaration
定义 Definition
//C++ class Foo{ public: //Function void function(); //Declaration } void Foo::function(){ //Definition ; }
//Java public class Foo{ //Method public void method{ //Definition ; }
继承 Inheritance
实现 Implements
扩展 extends
//C++ class Child : public Parents{ // Inheritance int member; }
//Java pubic class A extends BaseClass{ // extends public void execute(){ ; } } public class B implements InterfaceClass{ //Implements public void execute(){ ; } }
时间: 2024-10-13 15:12:58