Java泛型详解及实现 2019-08-16 Java 732 words 2 mins read 定义 在学习编程语言的变量时,都会了解一个变量的类型,函数的参数类型,那时候有个想法,参数的类型可以是参数吗? 那时候,仅仅只是听过泛型这个词, Read more..
Java数组实现栈 2019-08-15 数据结构 751 words 2 mins read GitHub 栈的定义及特性 栈的定义: 栈(stack)是一个数据集合,可以理解为只能在一端进行插入或删除操作的列表 栈的特点: 后进先出(last-in, f Read more..
集合的简介及使用 2019-08-13 Java 1846 words 4 mins read 简介 Arrays.asList()在平时开发中比较常见,可以使用它将一个数组转换位List集合 1 2 3 4 5 String[] myArray = { "apple", "banana", "orange" }; List<String> myList = Arrays.asList(myArray); //等价于 List<String> Read more..
BigDecimal的介绍及使用 2019-08-12 Java 595 words 2 mins read BigDecimal的用处 《阿里巴巴Java开发手册》提到:浮点数之间的等值判断,基本数据类型不能用 == 来比较,包装数据类型不能用equals Read more..
Java疑难点(一) 2019-08-12 Java 776 words 2 mins read 正确使用equals()方法 Object的equals方法容易抛空指针异常,应该使用常量或确定有值的对象来调用equals. 举例: 1 2 3 4 5 Read more..