摘要:
## IDEA导包(以junit为例) 1. 准备junit的jar包: * hamcrest-core-1.3.jar * junit-4.12.jar 2. 在项目中新建文件夹:lib 3. 将jar包复制进去 4. 打开项目结构设置:File - Project Structure 5. 依次 阅读全文
摘要:
## 反射相关类 1. Class:类的模板,可以根据Class获取目标类的所有信息。 2. Field:字段/属性。 3. Constructor:构造函数。 4. Method:类中的方法。 ## 获取Class的方式 1. 动态加载 ``` Class clz = Class.forName( 阅读全文
摘要:
## dom4j加载xml文件 ``` // 1. 加载xml文件 InputStream is = MyTest.class.getResourceAsStream("user.xml"); // 2. 载入到dom4j中 SAXReader reader = new SAXReader(); D 阅读全文
摘要:
index.html <!DOCTYPE html><html> <head> <meta charset="utf-8"> <title>购物车</title> <link rel="stylesheet" href="index.css" /> </head> <body><div id="ap 阅读全文
摘要:
# IDEA基本设置 ## 设置编码格式 1. Configure - Settings - Editor - File Encodings 2. 将三个编码全部设置为UTF-8 ## 启用Ctrl+滑轮缩放代码 1. Configure - Settings - Editor - General 阅读全文