程序开发中的名词定义

变量 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(){
        ;
    }
}
    

 

posted @ 2017-09-14 15:03  liutianchen  阅读(274)  评论(0编辑  收藏  举报