zoukankan      html  css  js  c++  java
  • Some notes in Stanford CS106A(3)

    1.If ( str1==str2 ) 

    means if str1 and str2 are refers to the same OBJECT.

    But when compare string , they are not the same actual object.

    So we usually use "str1.equals(str2)" to compare the value of the two strings.

    2.encryption  Caesar Cipher

    3.RAM----random access memory * everything have an adress 

    1 ) Static variables/Const  ( in a special location ) --in the memories to visit at the beginning of program

    2 ) Dynamic variables ( use "new" on ) -- the memory that comes for a dynamic called the HEAP.  HEAP goes from the top and goes down.

    Garbage collection : It's memory from the heap just gets reclaimed when it's no longer being used. But Ala you're using it , this memory still set aside for you.

    3 ) Local variables ( Stack ) -- method or parameters ( that got copied of the values which means it has to live sw in memory ) . Stack from the deep and goes up.

    When those variables go out of scope , like the method actually end, or get some closing curly brace, the Stack will AUTO get the memories:

    ----when variables is no longer use , it will popped off from the stack -- remove from the top. ( automaticlly get de-allocated by the machine. )

    4 ) Stack piont to a location in heap.

    4. Exception (略)

  • 相关阅读:
    linux服务器管理员的12个有用的命令
    登录服务器,首先用到的5个命令
    去掉hive字段中的tab
    html-css实例
    【转】你真的理解Python中MRO算法吗?
    【转】CentOS下expect 安装
    Python|PyCharm安装scrapy包
    Java连接Oracle
    Java连接mysql
    最常用正则表达式
  • 原文地址:https://www.cnblogs.com/wleaves/p/10506245.html
Copyright © 2011-2022 走看看