官术网_书友最值得收藏!

API

This is the tricky part, as it is very hard to predict ahead of time what kinds of method your application will require. Therefore, it's usually a good idea to start off with whatever is the norm and then make changes as your applications demand. Going by that, you would end up with an API that looks something like this:

  • Push: Pushes an item to the top of the stack
  • Pop: Removes an item from the top of the stack
  • Peek: Shows the last item pushed into the stack
  • Clear: Empties the stack
  • Size: Gets the current size of the stack
主站蜘蛛池模板: 蕉岭县| 偃师市| 嘉鱼县| 塔城市| 澄城县| 磐安县| 呼图壁县| 石屏县| 沁水县| 临夏县| 高碑店市| 田东县| 巴青县| 温泉县| 积石山| 大丰市| 手机| 伊吾县| 托里县| 增城市| 安庆市| 连山| 子洲县| 陇川县| 鄂尔多斯市| 谷城县| 垫江县| 丹阳市| 东明县| 安塞县| 观塘区| 萍乡市| 金阳县| 河西区| 临汾市| 河曲县| 宁河县| 鄂温| 陇南市| 南城县| 颍上县|