FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Lessons4JavaSE/src/unit06/EssentialExceptions.java at master · AlohaWorld/Lessons4JavaSE · GitHub
AlohaWorld
/
Lessons4JavaSE
Public
Notifications
You must be signed in to change notification settings
Fork
4
Star
19
Code
Issues
1
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Lessons4JavaSE
/
src
/
unit06
/
EssentialExceptions.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (17 loc) · 628 Bytes
Breadcrumbs
Lessons4JavaSE
/
src
/
unit06
/
EssentialExceptions.java
Copy path
File metadata and controls
23 lines (17 loc) · 628 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package
unit06
;
// Declaring exception in the method
import
java
.
io
.*;
public
class
EssentialExceptions
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
// { // There are checked exceptions in File I/O classes
FileWriter
output
=
new
FileWriter
(
"temp.txt"
);
// output.write("Java 101");
output
.
write
(
"今天天气真好,花儿都开了"
);
output
.
close
();
FileReader
input
=
new
FileReader
(
"temp.txt"
);
int
code
=
input
.
read
();
System
.
out
.
println
((
char
)
code
+
" "
+
code
);
// System.out.println((byte)code + " " + code);
input
.
close
();
}
}
Back
|
FazBrowse Home
|
New Git URL