Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CSDN 技术社区
skill_tree_java
提交
d7c3af42
S
skill_tree_java
项目概览
CSDN 技术社区
/
skill_tree_java
通知
43
Star
8
Fork
4
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
skill_tree_java
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
d7c3af42
编写于
11月 10, 2021
作者:
CSDN-Ada助手
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add questions
上级
088cd7f2
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
500 addition
and
37 deletion
+500
-37
data/2.Java中阶/1.IO(输入输出)/2.输入输出流/Input.json
data/2.Java中阶/1.IO(输入输出)/2.输入输出流/Input.json
+1
-1
data/2.Java中阶/1.IO(输入输出)/2.输入输出流/Input.md
data/2.Java中阶/1.IO(输入输出)/2.输入输出流/Input.md
+1
-1
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/FileRead.json
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/FileRead.json
+1
-1
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/FileRead.md
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/FileRead.md
+23
-3
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/FileWriter.json
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/FileWriter.json
+8
-0
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/FileWriter.md
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/FileWriter.md
+32
-0
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/config.json
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/config.json
+2
-1
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/Unzip.json
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/Unzip.json
+8
-0
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/Unzip.md
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/Unzip.md
+32
-0
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/Zip.json
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/Zip.json
+8
-0
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/Zip.md
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/Zip.md
+108
-0
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/config.json
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/config.json
+2
-1
data/2.Java中阶/2.RandomAccessFile/RandomAccessFile.json
data/2.Java中阶/2.RandomAccessFile/RandomAccessFile.json
+8
-0
data/2.Java中阶/2.RandomAccessFile/RandomAccessFile.md
data/2.Java中阶/2.RandomAccessFile/RandomAccessFile.md
+32
-0
data/2.Java中阶/2.RandomAccessFile/config.json
data/2.Java中阶/2.RandomAccessFile/config.json
+3
-2
data/2.Java中阶/3.对象序列化/1.寻找类/config.json
data/2.Java中阶/3.对象序列化/1.寻找类/config.json
+0
-8
data/2.Java中阶/3.对象序列化/2.序列化的控制/config.json
data/2.Java中阶/3.对象序列化/2.序列化的控制/config.json
+0
-8
data/2.Java中阶/3.对象序列化/3.使用“持久性”/config.json
data/2.Java中阶/3.对象序列化/3.使用“持久性”/config.json
+0
-8
data/2.Java中阶/3.对象序列化/ObjectSerializable.json
data/2.Java中阶/3.对象序列化/ObjectSerializable.json
+8
-0
data/2.Java中阶/3.对象序列化/ObjectSerializable.md
data/2.Java中阶/3.对象序列化/ObjectSerializable.md
+178
-0
data/2.Java中阶/3.对象序列化/config.json
data/2.Java中阶/3.对象序列化/config.json
+2
-1
data/2.Java中阶/4.使用JDBC操作数据库/1.JDBC概述/Abstract.json
data/2.Java中阶/4.使用JDBC操作数据库/1.JDBC概述/Abstract.json
+8
-0
data/2.Java中阶/4.使用JDBC操作数据库/1.JDBC概述/Abstract.md
data/2.Java中阶/4.使用JDBC操作数据库/1.JDBC概述/Abstract.md
+32
-0
data/2.Java中阶/4.使用JDBC操作数据库/1.JDBC概述/config.json
data/2.Java中阶/4.使用JDBC操作数据库/1.JDBC概述/config.json
+2
-1
data/2.Java中阶/4.使用JDBC操作数据库/2.数据库操作/config.json
data/2.Java中阶/4.使用JDBC操作数据库/2.数据库操作/config.json
+1
-1
未找到文件。
data/2.Java中阶/1.IO(输入输出)/2.输入输出流/Input.json
浏览文件 @
d7c3af42
{
"type"
:
"code_options"
,
"author"
:
"
陈龙
"
,
"author"
:
"
clong
"
,
"source"
:
"Input.md"
,
"exercise_id"
:
""
,
"notebook_enable"
:
true
...
...
data/2.Java中阶/1.IO(输入输出)/2.输入输出流/Input.md
浏览文件 @
d7c3af42
...
...
@@ -44,7 +44,7 @@ public class Input {
input
=
br
.
readLine
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
System
.
out
.
println
(
"输入数据:"
+
input
);
}
}
...
...
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/FileRead.json
浏览文件 @
d7c3af42
{
"type"
:
"code_options"
,
"author"
:
"
陈龙
"
,
"author"
:
"
clong
"
,
"source"
:
"FileRead.md"
,
"exercise_id"
:
""
,
"notebook_enable"
:
true
...
...
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/FileRead.md
浏览文件 @
d7c3af42
...
...
@@ -65,10 +65,29 @@ public class FileRead {
int
length
=
0
;
Reader
reader
=
new
InputStreamReader
(
new
FileInputStream
(
filePath
));
while
((
length
=
reader
.
read
(
chars
))
!=
-
1
)
{
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
System
.
out
.
print
(
chars
[
i
]);
}
String
str
=
new
String
(
chars
,
0
,
length
);
System
.
out
.
print
(
str
);
}
}
}
```
### C
```
java
import
java.io.*
;
public
class
FileRead
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
filePath
=
"test.txt"
;
FileReader
fr2
=
new
FileReader
(
filePath
);
char
[]
buf
=
new
char
[
20
];
int
length
;
while
((
length
=
fr2
.
read
(
buf
))
!=
-
1
)
{
String
str
=
new
String
(
buf
,
0
,
length
);
System
.
out
.
print
(
str
);
}
}
}
```
\ No newline at end of file
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/FileWriter.json
0 → 100644
浏览文件 @
d7c3af42
{
"type"
:
"code_options"
,
"author"
:
"clong"
,
"source"
:
"FileWriter.md"
,
"exercise_id"
:
""
,
"notebook_enable"
:
true
}
\ No newline at end of file
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/FileWriter.md
0 → 100644
浏览文件 @
d7c3af42
# FileWriter
`FileWriter`
类是从什么类直接继承而来:
## 答案
```
OutputStreamWriter
```
## 选项
### A
```
Writer
```
### B
```
FilterWriter
```
### C
```
java
BufferedWriter
```
\ No newline at end of file
data/2.Java中阶/1.IO(输入输出)/3.文件输入输出流/config.json
浏览文件 @
d7c3af42
...
...
@@ -19,6 +19,6 @@
}
}
],
"export"
:
[
"FileRead.json"
],
"export"
:
[
"FileRead.json"
,
"FileWriter.json"
],
"title"
:
"文件输入输出流"
}
\ No newline at end of file
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/Unzip.json
0 → 100644
浏览文件 @
d7c3af42
{
"type"
:
"code_options"
,
"author"
:
"clong"
,
"source"
:
"Unzip.md"
,
"exercise_id"
:
""
,
"notebook_enable"
:
true
}
\ No newline at end of file
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/Unzip.md
0 → 100644
浏览文件 @
d7c3af42
# UnZip
`ZipInputStream`
不包含的方法是:
## 答案
```
createZipEntry()
```
## 选项
### A
```
skip(long n)
```
### B
```
read(byte b, in off, int len)
```
### C
```
getNextEntry()
```
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/Zip.json
0 → 100644
浏览文件 @
d7c3af42
{
"type"
:
"code_options"
,
"author"
:
"clong"
,
"source"
:
"Zip.md"
,
"exercise_id"
:
""
,
"notebook_enable"
:
true
}
\ No newline at end of file
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/Zip.md
0 → 100644
浏览文件 @
d7c3af42
# Zip
以下
`Zip`
程序中,能正确完成对测试文件压缩的是:
## 答案
```
java
import
java.io.*
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
public
class
Zip
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
zipFileName
=
"test.zip"
;
String
fileName
=
"test.txt"
;
File
file
=
new
File
(
fileName
);
ZipOutputStream
out
=
new
ZipOutputStream
(
new
FileOutputStream
(
zipFileName
));
out
.
putNextEntry
(
new
ZipEntry
(
""
));
FileInputStream
in
=
new
FileInputStream
(
file
);
int
tmp
;
while
((
tmp
=
in
.
read
())
!=
-
1
)
{
out
.
write
(
tmp
);
}
in
.
close
();
out
.
close
();
}
}
```
## 选项
### A
```
java
import
java.io.*
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
public
class
Zip
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
zipFileName
=
"test.zip"
;
String
fileName
=
"test.txt"
;
File
file
=
new
File
(
fileName
);
ZipOutputStream
out
=
new
ZipOutputStream
(
zipFileName
);
out
.
putNextEntry
(
new
ZipEntry
(
""
));
FileInputStream
in
=
new
FileInputStream
(
file
);
int
tmp
;
while
((
tmp
=
in
.
read
())
!=
-
1
)
{
out
.
write
(
tmp
);
}
in
.
close
();
out
.
close
();
}
}
```
### B
```
java
import
java.io.*
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
public
class
Zip
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
zipFileName
=
"test.zip"
;
String
fileName
=
"test.txt"
;
File
file
=
new
File
(
fileName
);
ZipOutputStream
out
=
new
ZipOutputStream
(
new
FileOutputStream
(
zipFileName
));
out
.
putNextEntry
();
FileInputStream
in
=
new
FileInputStream
(
file
);
int
tmp
;
while
((
tmp
=
in
.
read
())
!=
-
1
)
{
out
.
write
(
tmp
);
}
in
.
close
();
out
.
close
();
}
}
```
### C
```
java
import
java.io.*
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
public
class
Zip
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
zipFileName
=
"test.zip"
;
String
fileName
=
"test.txt"
;
File
file
=
new
File
(
fileName
);
ZipOutputStream
out
=
new
ZipOutputStream
(
new
FileOutputStream
(
zipFileName
));
out
.
putNextEntry
(
new
ZipEntry
(
""
));
FileInputStream
in
=
new
FileOutputStream
(
file
);
int
tmp
;
while
((
tmp
=
in
.
read
())
!=
-
1
)
{
out
.
write
(
tmp
);
}
in
.
close
();
out
.
close
();
}
}
```
data/2.Java中阶/1.IO(输入输出)/7.ZIP压缩输入输出流/config.json
浏览文件 @
d7c3af42
...
...
@@ -19,6 +19,6 @@
}
}
],
"export"
:
[],
"export"
:
[
"Zip.json"
,
"Unzip.json"
],
"title"
:
"ZIP压缩输入输出流"
}
\ No newline at end of file
data/2.Java中阶/2.RandomAccessFile/RandomAccessFile.json
0 → 100644
浏览文件 @
d7c3af42
{
"type"
:
"code_options"
,
"author"
:
"clong"
,
"source"
:
"RandomAccessFile.md"
,
"exercise_id"
:
""
,
"notebook_enable"
:
true
}
\ No newline at end of file
data/2.Java中阶/2.RandomAccessFile/RandomAccessFile.md
0 → 100644
浏览文件 @
d7c3af42
# RandomAccessFile
以下关于
`RandomAccessFile`
的说法错误的是:
## 答案
```
RandomAccessFile可以实现对文件以及IO节点的随机访问
```
## 选项
### A
```
getFilePointer和seek是RandomAccessFile实现随机访问的核心方法
```
### B
```
RandomAccessFile使用了指针的思想
```
### C
```
RandomAccessFile可以用来实现多线程下载及断点续传
```
data/2.Java中阶/2.RandomAccessFile/config.json
浏览文件 @
d7c3af42
{
"node_id"
:
"java-3c0553280d2a4b60983a5ae18e7112a4"
,
"keywords"
:
[],
"keywords"
:
[
"随机"
,
"访问"
,
"文件"
],
"children"
:
[],
"export"
:
[],
"export"
:
[
"RandomAccessFile.json"
],
"title"
:
"RandomAccessFile"
}
\ No newline at end of file
data/2.Java中阶/3.对象序列化/1.寻找类/config.json
已删除
100644 → 0
浏览文件 @
088cd7f2
{
"node_id"
:
"java-21c738a097fb46a4a156d787dc4778b7"
,
"keywords"
:
[],
"children"
:
[],
"export"
:
[],
"title"
:
"寻找类"
}
\ No newline at end of file
data/2.Java中阶/3.对象序列化/2.序列化的控制/config.json
已删除
100644 → 0
浏览文件 @
088cd7f2
{
"node_id"
:
"java-01546694ece242b6869cb662498c6670"
,
"keywords"
:
[],
"children"
:
[],
"export"
:
[],
"title"
:
"序列化的控制"
}
\ No newline at end of file
data/2.Java中阶/3.对象序列化/3.使用“持久性”/config.json
已删除
100644 → 0
浏览文件 @
088cd7f2
{
"node_id"
:
"java-89c87044f09c446588eb96d76b766dcd"
,
"keywords"
:
[],
"children"
:
[],
"export"
:
[],
"title"
:
"使用“持久性”"
}
\ No newline at end of file
data/2.Java中阶/3.对象序列化/ObjectSerializable.json
0 → 100644
浏览文件 @
d7c3af42
{
"type"
:
"code_options"
,
"author"
:
"clong"
,
"source"
:
"ObjectSerializable.md"
,
"exercise_id"
:
""
,
"notebook_enable"
:
true
}
\ No newline at end of file
data/2.Java中阶/3.对象序列化/ObjectSerializable.md
0 → 100644
浏览文件 @
d7c3af42
# Object Serializable
以下关于对象的序列化与反序列化程序中,正确的是:
## aop
### before
```
java
//
```
## 答案
```
java
import
java.io.*
;
import
java.io.Serializable
;
class
Student
implements
Serializable
{
private
String
name
;
private
String
sex
;
private
Integer
age
;
public
Student
(
String
name
,
String
sex
,
Integer
age
)
{
this
.
name
=
name
;
this
.
sex
=
sex
;
this
.
age
=
age
;
}
@Override
public
String
toString
()
{
return
"name:"
+
this
.
name
+
","
+
"sex:"
+
this
.
sex
+
","
+
"age:"
+
this
.
age
;
}
}
public
class
SerializableDemo
{
public
static
void
main
(
String
[]
args
)
throws
IOException
,
ClassNotFoundException
{
// 序列化
Student
student
=
new
Student
(
"小明"
,
"男"
,
15
);
System
.
out
.
println
(
student
);
ObjectOutputStream
oos
=
new
ObjectOutputStream
(
new
FileOutputStream
(
"student"
));
oos
.
writeObject
(
student
);
oos
.
close
();
// 反序列化
File
file
=
new
File
(
"student"
);
ObjectInputStream
ois
=
new
ObjectInputStream
(
new
FileInputStream
(
file
));
Student
student
=
(
Student
)
ois
.
readObject
();
ois
.
close
();
System
.
out
.
println
(
student
);
}
}
```
## 选项
### A
```
java
import
java.io.*
;
public
class
Student
{
private
String
name
;
private
String
sex
;
private
Integer
age
;
public
Student
(
String
name
,
String
sex
,
Integer
age
)
{
this
.
name
=
name
;
this
.
sex
=
sex
;
this
.
age
=
age
;
}
@Override
public
String
toString
()
{
return
"name:"
+
this
.
name
+
","
+
"sex:"
+
this
.
sex
+
","
+
"age:"
+
this
.
age
;
}
}
public
class
SerializableDemo
{
public
static
void
main
(
String
[]
args
)
throws
IOException
,
ClassNotFoundException
{
// 序列化
Student
student
=
new
Student
(
"小明"
,
"男"
,
15
);
System
.
out
.
println
(
student
);
ObjectOutputStream
oos
=
new
ObjectOutputStream
(
new
FileOutputStream
(
"student"
));
oos
.
writeObject
(
student
);
oos
.
close
();
// 反序列化
File
file
=
new
File
(
"student"
);
ObjectInputStream
ois
=
new
ObjectInputStream
(
new
FileInputStream
(
file
));
Student
student
=
(
Student
)
ois
.
readObject
();
ois
.
close
();
System
.
out
.
println
(
student
);
}
}
```
### B
```
java
import
java.io.*
;
import
java.io.Serializable
;
public
class
Student
implements
Serializable
{
private
String
name
;
private
String
sex
;
private
Integer
age
;
public
Student
(
String
name
,
String
sex
,
Integer
age
)
{
this
.
name
=
name
;
this
.
sex
=
sex
;
this
.
age
=
age
;
}
@Override
public
String
toString
()
{
return
"name:"
+
this
.
name
+
","
+
"sex:"
+
this
.
sex
+
","
+
"age:"
+
this
.
age
;
}
}
public
class
SerializableDemo
{
public
static
void
main
(
String
[]
args
)
throws
IOException
,
ClassNotFoundException
{
// 序列化
Student
student
=
new
Student
(
"小明"
,
"男"
,
15
);
System
.
out
.
println
(
student
);
ObjectOutputStream
oos
=
new
ObjectOutputStream
(
new
FileOutputStream
(
"student"
));
oos
.
writeObject
(
student
);
oos
.
close
();
// 反序列化
File
file
=
new
File
(
"student"
);
ObjectInputStream
ois
=
new
ObjectInputStream
(
new
FileInputStream
(
file
));
Student
student
=
ois
.
readObject
();
ois
.
close
();
System
.
out
.
println
(
student
);
}
}
```
### C
```
java
import
java.io.*
;
import
java.io.Serializable
;
public
class
Student
implements
Serializable
{
private
String
name
;
private
String
sex
;
private
Integer
age
;
public
Student
(
String
name
,
String
sex
,
Integer
age
)
{
this
.
name
=
name
;
this
.
sex
=
sex
;
this
.
age
=
age
;
}
@Override
public
String
toString
()
{
return
"name:"
+
this
.
name
+
","
+
"sex:"
+
this
.
sex
+
","
+
"age:"
+
this
.
age
;
}
}
public
class
SerializableDemo
{
public
static
void
main
(
String
[]
args
)
throws
IOException
,
ClassNotFoundException
{
// 序列化
Student
student
=
new
Student
(
"小明"
,
"男"
,
15
);
System
.
out
.
println
(
student
);
ObjectOutputStream
oos
=
new
ObjectOutputStream
(
new
FileInputStream
(
"student"
));
oos
.
writeObject
(
student
);
oos
.
close
();
// 反序列化
File
file
=
new
File
(
"student"
);
ObjectInputStream
ois
=
new
ObjectInputStream
(
new
FileOutputStream
(
file
));
Student
student
=
(
Student
)
ois
.
readObject
();
ois
.
close
();
System
.
out
.
println
(
student
);
}
}
```
data/2.Java中阶/3.对象序列化/config.json
浏览文件 @
d7c3af42
...
...
@@ -2,6 +2,6 @@
"node_id"
:
"java-ec1081c263a84d41b692d4821d8254e6"
,
"keywords"
:
[],
"children"
:
[],
"export"
:
[],
"export"
:
[
"ObjectSerializable.json"
],
"title"
:
"对象序列化"
}
\ No newline at end of file
data/2.Java中阶/4.使用JDBC操作数据库/1.JDBC概述/Abstract.json
0 → 100644
浏览文件 @
d7c3af42
{
"type"
:
"code_options"
,
"author"
:
"clong"
,
"source"
:
"Abstarct.md"
,
"exercise_id"
:
""
,
"notebook_enable"
:
true
}
\ No newline at end of file
data/2.Java中阶/4.使用JDBC操作数据库/1.JDBC概述/Abstract.md
0 → 100644
浏览文件 @
d7c3af42
# JDBC abstract
以下关于
`JDBC`
的说法错误的是:
## 答案
```
```
## 选项
### A
```
JDBC全称是Java DataBase Connection
```
### B
```
JDBC由一组Java语言编写的类与接口组成
```
### C
```
JDBC是一种标准Java应用编程接口
```
data/2.Java中阶/4.使用JDBC操作数据库/1.JDBC概述/config.json
浏览文件 @
d7c3af42
...
...
@@ -27,6 +27,6 @@
}
}
],
"export"
:
[],
"export"
:
[
"Abstract.json"
],
"title"
:
"JDBC概述"
}
\ No newline at end of file
data/2.Java中阶/4.使用JDBC操作数据库/2.数据库操作/config.json
浏览文件 @
d7c3af42
{
"node_id"
:
"java-fd66a76b04b84d8da4454f6f9728aca0"
,
"keywords"
:
[],
"keywords"
:
[
"数据库"
,
"操作"
,
"添加"
,
"修改"
,
"删除"
,
"查询"
],
"children"
:
[
{
"数据库基础"
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录