![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
|绝对值|
这个作者很懒,什么都没留下…
展开
-
Java List Set Array之间的转换
主要依据的方法:asList()与toArray()Array.asList();Collection.toArray();1.Array与List相互转换a).Array转ListasList()方法,若对s进行修改则会直接影响list。String[] s=new String[] {"A","B"};List<String> list=Array.asL...原创 2019-11-29 14:49:15 · 137 阅读 · 0 评论 -
Java Map,Map初始化,遍历以及Map.Entry
Java Map是Java中的一个集合类,常用的比较熟悉的集合类还有List但Map不同于List的是,Map的值是通过“键”和“值”来存储,每个键映射到一个值因此,键值往往可以用Set存储(Set是集合类,不重复的无序集合)值则不一定那么下面就介绍Java Map的初始化,常用用法等Map.Entry则是Map的一个内部接口Map提供常用方法 如可以Set(),entrySet()等...原创 2019-11-26 14:52:38 · 1061 阅读 · 0 评论 -
Java ListItetator 与Itetator
ListItetator1.迭代器指向的位置迭代器指向的位置是在元素之前的图片来自https://blog.csdn.net/longshengguoji/article/details/41551491集合List由四个元素List1、List2、List3和List4组成,当使用语句Iterator iter = List.Iterator()时,迭代器iter指向...原创 2019-11-22 19:38:51 · 189 阅读 · 0 评论 -
PIMCMD
This assignment involves the creation of simple Personal Information Management system that can deal with 4 kinds of items: todo items, notes, appointments and contacts. Each of these kinds of items i...原创 2019-11-25 14:40:46 · 746 阅读 · 0 评论 -
杨辉三角
杨辉三角首先我们知道杨辉三角的定义:杨辉三角中 每个数是他左上方和右上方数的和,并且每一行的长度等于行数本身也就是说 处于第i行的第j个元素 等于第i减一行第j和j-1个元素之和(首尾除外)那归纳一下我们要实现的就是首尾单独的设元素值为1每一行根据上一行的结果得出第一个数组:List<list<Integer>> answer=new ArrayL...原创 2019-10-23 20:11:25 · 1061 阅读 · 0 评论 -
SumOfargs
Create a class namedSumOfArgsthat will print out the sum of all integer arguments found on the command line. It should have a main() method so the class can be run. Anything that is not an intege...原创 2019-10-23 18:51:55 · 226 阅读 · 0 评论 -
Student Course Book
Create classes namedBook, CourseandStudentto perform simple course-selecting system (CSS).Studenthas at least three overloaded constructors with different parameter list.Studentmay select one ...原创 2019-11-19 14:51:24 · 755 阅读 · 1 评论 -
创建一个名为的类SumOfArgs,该类将打印出在命令行上找到的所有整数参数的总和。
import java.util.Scanner;public class SumOfArgs{ public static void main(String[] args) { Scanner scanner= new Scanner(System.in); String line=scanner.nextLine(); char a[]...原创 2019-10-19 13:44:44 · 510 阅读 · 1 评论