摘要: 考点 上代码 public class Exam5 { static int s; int i; int j; { System.out.println("非静态代码块"); int i = 1; i ++; j ++; s ++; } public void test(int j){ j ++; 阅读全文
posted @ 2021-03-17 10:21 卡卡罗特琪琪 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 第一种方式 使用maven命令进行手动导入jar包 如,在maven中导入Oracle 10g的jar包 mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.4.0 -Dpackagi 阅读全文
posted @ 2021-03-16 23:18 卡卡罗特琪琪 阅读(1184) 评论(0) 推荐(0) 编辑
摘要: 算法是什么 算法(Algorithm)是指用来操作数据、解决程序问题的一组方法。对于同一个问题,使用不同的算法,也许最终得到的结果是一样的,但在过程中消耗的资源和时间却会有很大的区别。 时间维度:是指执行当前算法所消耗的时间,我们通常用「时间复杂度」来描述。 空间维度:是指执行当前算法需要占用多少内 阅读全文
posted @ 2021-03-16 16:59 卡卡罗特琪琪 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 解决方法:修改 setting.xml 文件,把 mirror 改成阿里的镜像。 1、打开 maven 目录下的 conf/setting.xml,注意要是 idea 使用的 maven。 2、搜索 <mirrors>;找到 <mirrors>。在 <mirrors> 节点下添加。 <mirror> 阅读全文
posted @ 2021-03-16 14:12 卡卡罗特琪琪 阅读(240) 评论(0) 推荐(0) 编辑
摘要: Maven 构建 Java 项目 > Maven 使用原型 archetype 插件创建项目。要创建一个简单的 Java 应用,我们将使用 maven-archetype-quickstart 插件。 mvn archetype:generate "-DgroupId=com.companyname 阅读全文
posted @ 2021-03-16 13:55 卡卡罗特琪琪 阅读(66) 评论(0) 推荐(0) 编辑
摘要: 非常之多 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache. 阅读全文
posted @ 2021-03-16 10:48 卡卡罗特琪琪 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 以下命令来查看 Super POM 默认配置:mvn help:effective-pom 在下面的 pom.xml 中,你可以看到 Maven 在执行目标时需要用到的默认工程源码目录结构、输出目录、需要的插件、仓库和报表目录。 D:\maven-test\com\companyname\proje 阅读全文
posted @ 2021-03-16 09:09 卡卡罗特琪琪 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 第一种(用递归) public static int step(int n){ if(n < 1){ throw new IllegalArgumentException("n不能小于1。"); } if(n == 1 || n == 2){ return n; } return step(n - 阅读全文
posted @ 2021-03-15 15:36 卡卡罗特琪琪 阅读(1065) 评论(0) 推荐(1) 编辑
摘要: 上代码 public class Exam4 { public static void main(String[] args) { int i = 1; String str = "hello"; Integer num = 200; int[] arr = {1,2,3,4,5}; MyData 阅读全文
posted @ 2021-03-15 10:49 卡卡罗特琪琪 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 上代码(Son和Father) public class Father { private int i = test(); private static int j = method(); static { System.out.print("(1) "); } Father(){ System.o 阅读全文
posted @ 2021-03-14 16:46 卡卡罗特琪琪 阅读(183) 评论(0) 推荐(0) 编辑