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 (略)

  • 相关阅读:
    word2010怎么把白色方框变成黑色方框?
    Ubuntu 14.04 安装 Sublime Text 3
    安装xmlspy之后,链接及邮箱等都用这个软件打开,怎样取消?
    SRAM、DRAM、SDRAM、DDR、DDR2、DDR3
    ROM和RAM区别
    shell脚本分析一
    重要网址
    vi/vim
    dump_stack使用
    BIOS、BootLoader、uboot对比
  • 原文地址:https://www.cnblogs.com/wleaves/p/10506245.html
Copyright © 2011-2022 走看看