ORID_52

作者: Wilbur_ | 来源:发表于2019-11-28 10:08 被阅读0次

    从上个月开始了CS61B(伯克利大学的一门计算机课程),这次是我上课的笔记和自己犯错的地方
    Argument等于参数,constructor主要是为了能让这个class跑起来,英文就是initialize the class.

    做好一个function之后无法return

    这里还是出现了之前的问题,就是无法把自己的结果给出来。
    参考MaxArray这里的想法,哦哦哦!!!
    我居然把windowPosSum 设置成了integer,这能不在反馈的时候出问题吗??


    image.png

    为什么return a 之后这里无法

    Notes

    1. Functions must be declared as part of a class in java.
      A function that is part of a class is called a "method".

    2. To define a function in Java we use "public static".

    3. All

    class is like a file in java, it is used to get a results or called upon a function.
    A member of a class is the variables and methods(functions) in the class.
    member of a class are accessed using dot notation. For example, d.makenoise is calling "makenoise" method in "d" class

    相关文章

      网友评论

          本文标题:ORID_52

          本文链接:https://www.haomeiwen.com/subject/cqnywctx.html