Lecture 18

来源:互联网 发布:关于美食的评价知乎 编辑:程序博客网 时间:2024/05/16 14:17

Lecture 18

Multi-dim arrays

2*100

int[][] scores = new int[2][100];

score[0][0] ——> int
score[0] ——–>int[]

ArrayList

pro:

  • dynamic resizing
  • other ops

cons:
* less efficient than array
* syntax bulky
* pre 5.0

fixed size ——-> array

Debugging

Design ———> Architect

Coding ———> Engineer

Testing ———> Vandal

Debugging ——–> detective

4D

Design

Development

Debugging

Deployment

Space shuttle

int x; $1000

500k; 500Million $

bugs

bad values

fault logic

unwanted assumptions

debugs

simple

Systematic

assumptions about problems

critical

Don`t panic

approach to debug

println
* method
* variables

Unit test

原创粉丝点击