Some notes in Stanford CS106A(2)

wleaves 2019-03-08 原文

Some notes in Stanford CS106A(2)

1.Local variable(local)

ex. int i = 0; factorial(i);

the “i” outside the method factorial(i) is called local variable ; and the “i” in method factorial(i) is a copy of the “i” outside

instance variable(ival) local variable(local)
declared in class  declared in method
visable in entity object vis in method
lives ala object lives lives in method
state  local competition

 

 

 

 

2.Class variable(static variable)

A variable that is shared by all objects of that class.

ex.public static int Counter; 

IF “Counter” is setting to another num, the one who used the class which include the Class var , will get the new num.

like ,

Public class ClassCounter {
    public ClassCounter (){
        counter=1;
    };
    public ClassCounter (int count){
        counter=count;
    };
    public int getnum(){
        return counter;
    }
    private static int counter;
}
...
ClassCounter counter1 = new ClassCounter(); 
ClassCounter counter2 = new ClassCounter(1000); 
println(counter1.getnum());
//the printout is 1000

3.Javadoc for ACM libraries

http://jtf.acm.org/javadoc/student/

4.getters and setters—-the difference with public:

    setter is used to make sure the value we want to set is right, if not right ,we can prevent changing the value. (more details please refers to other docs. like     

    https://www.cnblogs.com/Jac440682/p/6752152.html

5.stacking order(z-order) sth. used in acm.graphics(略,非重点)

 

发表于 2019-03-08 15:30 苏悠莫 阅读() 评论() 编辑 收藏

 

版权声明:本文为wleaves原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/wleaves/p/10496142.html

Some notes in Stanford CS106A(2)的更多相关文章

  1. Some notes in Stanford CS106A(3)

    Some notes in Stanford CS106A(3) 1.If ( str1==str2 )  m […]...

  2. (Stanford CS224d) Deep Learning and NLP课程笔记(一):Deep NLP – 公子天

    (Stanford CS224d) Deep Learning and NLP课程笔记(一):Deep NLP […]...

  3. AWS CSAA — 01 Introduction To The Course

    1. 为什么要学习AWS认证? 2. AWS认证的考试是如何组织的? 3. 你需要做些什么? 4. 关于CSA […]...

  4. Stanford coursera Andrew Ng 机器学习课程编程作业(Exercise 1)

    Exercise 1:Linear Regression—实现一个线性回归 在本次练习中,需要实现 […]...

  5. stanford Protege 4.3 ERROR: Bundle org.protege.common 解决方法 – Wonder奇迹奇迹

    stanford Protege 4.3 ERROR: Bundle org.protege.common 解 […]...

  6. Some notes in Stanford CS106A

    Some notes in Stanford CS106A Karel world 1.During make […]...

  7. Stanford NLP学习笔记:7. 情感分析(Sentiment)

    1. 什么是情感分析(别名:观点提取,主题分析,情感挖掘。。。) 应用: 1)正面VS负面的影评(影片分类问题 […]...

  8. Stanford CS224N 第二课: word2vec详细介绍

    word2vec模型   word2vec 模型有两种: Continuous Skip-gram Model […]...

随机推荐

  1. 【bugku】【RE】file WriteUp

    FILE   查壳后显示无壳,拖进IDA:   运行程序时传递的第一个参数为一个文件名,并打开该文件。下面点进 […]...

  2. 微信小程序开发系列六:微信框架API的调用

    微信小程序开发系列教程 微信小程序开发系列一:微信小程序的申请和开发环境的搭建 微信小程序开发系列二:微信小程 […]...

  3. 大数据时代的结构化存储–HBase

    迄今,相信大家肯定听说过 HBase,但是对于 HBase 的了解可能仅仅是它是 Hadoop 生态圈重要的一 […]...

  4. CentOS安装相应版本的内核源码

    昨天接到同事给安排的新任务,测试系统性能;网上查了些资料,目测perf功能很强大,而且是内核源码自带的,编译安 […]...

  5. mysql 的命令行操作

    cmd 打开Dos窗口 输入:  mysql  -h(IP,如果是本机则为localhost)  -u(use […]...

  6. Java 面向对象编程 抽象类 抽象方法 abstract

    抽象类 通过abstract定义的方法是抽象方法,它只有定义,没有实现。抽象方法定义了子类必须实现的接口规范; […]...

  7. [zz]Word 2007文档中图片不显示或对象不显示的解决方法 – 叶落无痕

    症状:打开包含图片或对象的 Microsoft Office Word 2007 文档时,图片或对象不显示。 […]...

  8. CSS filter 有哪些神奇用途

    复古、版画、油画、漫画、液化、老照片、性冷淡、莫兰迪、赛博朋克、旺达幻视风格通通都可以实现! 背景 基本概念 […]...

展开目录

目录导航