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

Getting ready

Before learning how to write generic code, let's see an example of a problem that generics solve. I bet you are familiar with stack data structures and have been using it in one of the computer science courses before. Anyway, it's a kind of collection data structure that follows LIFO (Last in first out). It has very commonly used APIs for these operations, which are pop and push. Push inserts new item to the stack; pop returns the last inserted one. It's just a simple overview, as we will not explain data structures in this book as it's out of topic.

主站蜘蛛池模板: 玛纳斯县| 西吉县| 团风县| 海南省| 长丰县| 徐汇区| 东安县| 天等县| 屏南县| 清丰县| 祁东县| 广南县| 武宁县| 衡山县| 湖口县| 牡丹江市| 合水县| 鹤庆县| 广安市| 道真| 宝鸡市| 卫辉市| 石林| 新昌县| 和政县| 明水县| 达州市| 观塘区| 分宜县| 渝中区| 旺苍县| 景德镇市| 台东市| 颍上县| 高雄市| 佛山市| 伊宁市| 高要市| 西昌市| 洛隆县| 西乌|