自定义数组 主要功能有增.删(根据索引,根据值).改.查扩容等功能 package array; public class CustomArray { private int[] array = null; //数组有效长度 public int length = 0; //空参构造函数,默认数组大小为10 public CustomArray() { this.array = new int[10]; } public CustomArray(int size) { this.array =
2016.07.26 qq:992591601,欢迎交流 首先介绍些基本概念: Annotations(also known as metadata)provide a formalized way to add information to your code so that you can easily use that data at some later point. Annotations are partly motivated by a general trend toward c
Java 自定义线程池 https://www.cnblogs.com/yaoxiaowen/p/6576898.html public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandle
题目: 编写一个程序,此程序从命令行接收多个数字,求和之后输出结果. 设计思想: 1.记录要输入的数字的个数n 2.建立一个长度为n的数组存储输入的数字 3.累加求和并输出结果 注:此程序中应用了Scanner类来处理数字的输入,并阻止非法输入.借助于Scanner,可以针对任何要处理的文本内容编写自定义的语法分析器. 流程图 源代码: package 作业1; import java.util.Scanner; public class Sum { public static void mai