Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Tài liệu HOT
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Lecture Fundamentals of computing 1: Lecture 13 - Duy Tan University
TAILIEUCHUNG - Lecture Fundamentals of computing 1: Lecture 13 - Duy Tan University
Lecture Fundamentals of computing 1: Lecture 13 introduce file processing. This chapter presents the following content: Class file concept, some methods of class file, reading files with scanner, file paths, compiler error w/ files,.and another contents. Inviting you refer. | Lecture Title: File processing Fundamentals of Computing 1 Agenda File input File output ask them, how might the computer store "hi" using binary digits? (some kind of mapping; ASCII) Class File File class is in the package . To use class File, we have to import as follow: import .*; Create a File object to get info about a file on your drive. (This doesn't actually create a new file on the hard disk.) File f = new File(""); if (() && () > 1000) { (); } Some methods of class File Method name Description canRead() returns whether file is able to be read delete() removes file from disk exists() whether this file exists on disk getName() returns file's name length() returns number of bytes in file renameTo(file) changes name of file Reading files with Scanner To read a file, pass a File when constructing a Scanner. Syntax: Scanner name = new Scanner(new File("file name")); Example: File file = new File(""); Scanner input = new Scanner(file); or (shorter): Scanner input = new Scanner(new File("")); It is nice that Java uses the same object to read files as it does to read the keyboard. It's simpler and easier to learn. Some languages (C, Python, etc.) don't do this. File paths absolute path: specifies a drive or a top "/" folder C:/Documents/smith/hw6/input/ Windows can also use backslashes to separate folders. relative path: does not specify any top-level folder input/ Assumed to be relative to the current directory: Scanner input = new Scanner(new File("data/")); If our program is in H:/hw6 , Scanner will look for H:/hw6/data/ Compiler error w/ files import .*; // for File import .*; // for Scanner public class ReadFile { public static void main(String[] args) { Scanner input = new Scanner(new File("")); String text = (); (text); } } The program fails to compile with the .
Nhật Tiến
76
44
ppt
Báo lỗi
Trùng lắp nội dung
Văn hóa đồi trụy
Phản động
Bản quyền
File lỗi
Khác
Upload
Tải xuống
đang nạp các trang xem trước
Không thể tạo bản xem trước, hãy bấm tải xuống
Tải xuống
TÀI LIỆU LIÊN QUAN
Lecture Wireless and mobile computing – Chapter 2: Wireless and mobile computing transmission fundamentals
31
94
0
Lecture Wireless and mobile computing – Chapter 2: Wireless and mobile computing transmission fundamentals
57
67
1
Lecture Fundamentals of computing 1: Lecture 0 - Duy Tan University
6
89
0
Lecture Fundamentals of computing 1: Lecture 1 - Duy Tan University
95
92
0
Lecture Fundamentals of computing 1: Lecture 2 - Duy Tan University
36
79
0
Lecture Fundamentals of computing 1: Lecture 3 - Duy Tan University
38
68
0
Lecture Fundamentals of computing 1: Lecture 4 - Duy Tan University
39
72
0
Lecture Fundamentals of computing 1: Lecture 5 - Duy Tan University
7
59
0
Lecture Fundamentals of computing 1: Lecture 6 - Duy Tan University
59
71
0
Lecture Fundamentals of computing 1: Lecture 7 - Duy Tan University
79
92
0
TÀI LIỆU XEM NHIỀU
Một Case Về Hematology (1)
8
461860
55
Giới thiệu :Lập trình mã nguồn mở
14
22617
59
Tiểu luận: Tư tưởng Hồ Chí Minh về xây dựng nhà nước trong sạch vững mạnh
13
10883
529
Câu hỏi và đáp án bài tập tình huống Quản trị học
14
10061
446
Phân tích và làm rõ ý kiến sau: “Bài thơ Tự tình II vừa nói lên bi kịch duyên phận vừa cho thấy khát vọng sống, khát vọng hạnh phúc của Hồ Xuân Hương”
3
9516
104
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8275
1125
Tiểu luận: Nội dung tư tưởng Hồ Chí Minh về đạo đức
16
8226
423
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7863
2220
Đề tài: Dự án kinh doanh thời trang quần áo nữ
17
6671
253
Vật lý hạt cơ bản (1)
29
5767
85
TỪ KHÓA LIÊN QUAN
Kỹ thuật lập trình
Fundamentals of computing
Lecture Fundamentals of computing 1
Java programming
File processing
Methods of class file
File paths
Mobile computing
Wireless and mobile computing
Services data
Wireless communication
Transmission fundamentals
Mobile computing transmission fundamentals
Developing programming skills
Data type
Conditional expression
Computer vocabulary
Installing Eclipse
Basic Java programs
Structured algorithms
Data types
Number primitive types
Mixing types
Console output
Scanner class
Common pitfalls
Imported class
Relational expressions
If statements
Switch statements
Random question
Random answer
Reference semantics
Arrays for tallying
Arrays as parameter
The String class
Immutable string
String comparison
Java OOPs
Method overloading
Object Oriented Programming System
Syntax of inheritance
Types of inheritance
Method overriding
Abstract class
Abstract method
Extended interface
Java Access Modifier
Static keyword
Final keyword
Exception handing
Multiple catch block
Nested try statements
Graphic User Interface
Layout manager
Mouse events
Inner class
Static inner class
Anonymous inner class
Discovering computers fundamentals
Computers fundamentals
Enterprise Computing
Information systems in the enterprise
Enterprise wide technologies
Cloud computing
Frequency period relationship
Signals for conveying information
Digital data transmission
Programming in C++
Lecture Programming in C++
History of electronic computers
Computing fundamentals
Memory access
Central processing unit
TÀI LIỆU MỚI ĐĂNG
Giáo án mầm non chương trình đổi mới: Gia đình vui nhộn
4
312
1
25-04-2024
Động cơ đốt trong và máy kéo công nghiêp tập 1 part 7
23
258
0
25-04-2024
Sáng tạo trong thuật toán và lập trình với ngôn ngữ Pascal và C# Tập 2 - Chương 4
47
246
1
25-04-2024
Mass Transfer in Multiphase Systems and its Applications Part 19
40
255
1
25-04-2024
CẤU TẠO HẠT NHÂN NGUYÊN TỬ-ĐỘ HỤT KHỐI-NĂNG LƯỢNG LIÊN KẾT-LK RIÊNG
12
264
0
25-04-2024
Anh văn bằng C-124
8
172
0
25-04-2024
MySQL Basics for Visual Learners PHẦN 9
15
183
0
25-04-2024
Công nghiệp gang thép Việt Nam : Một giai đoạn phát triển và chuyển đổi chính sách mới part 5
6
194
0
25-04-2024
THE ANTHROPOLOGY OF ONLINE COMMUNITIES BY Samuel M.Wilson and Leighton C. Peterson
19
144
0
25-04-2024
MÔN HỌC VẬT LIỆU VÀ CÔNG NGHỆ KIM LOẠI - PHẦN I: KIM LOẠI HỌC
32
175
2
25-04-2024
TÀI LIỆU HOT
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7863
2220
Giáo trình Tư tưởng Hồ Chí Minh - Mạch Quang Thắng (Dành cho bậc ĐH - Không chuyên ngành Lý luận chính trị)
152
5699
1356
Ebook Chào con ba mẹ đã sẵn sàng
112
3764
1231
Ebook Tuyển tập đề bài và bài văn nghị luận xã hội: Phần 1
62
5315
1136
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8275
1125
Giáo trình Văn hóa kinh doanh - PGS.TS. Dương Thị Liễu
561
3493
642
Tiểu luận: Tư tưởng Hồ Chí Minh về xây dựng nhà nước trong sạch vững mạnh
13
10883
529
Giáo trình Sinh lí học trẻ em: Phần 1 - TS Lê Thanh Vân
122
3680
525
Giáo trình Pháp luật đại cương: Phần 1 - NXB ĐH Sư Phạm
274
4042
514
Bài tập nhóm quản lý dự án: Dự án xây dựng quán cafe
35
4123
480
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.