没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Copyright
Table of Contents
Index
Full Description
About the Author
Reviews
Reader reviews
Errata
Java Cookbook
Ian Darwin
Publisher: O'Reilly
First Edition June 2001
ISBN: 0-59600-170-3, 882 pages
This book offers Java developers short, focused pieces of code that
are easy to incorporate into other programs. The idea is to focus on
things that are useful, tricky, or both. The book's code segments
cover all of the dominant APIs and should serve as a great "jumping-
off place" for Java developers who want to get started in areas
outside their specialization.
Java Cookbook
Preface
Who This Book Is For
What's in This Book?
Platform Notes
Other Books
Conventions Used in This Book
Comments and Questions
Getting the Source Code
Acknowledgments
1. Getting Started: Compiling, Running, and Debugging
1.1 Introduction
1.2 Compiling and Running Java: JDK
1.3 Editing and Compiling with a Color-Highlighting Editor
1.4 Compiling, Running, and Testing with an IDE
1.5 Using Classes from This Book
1.6 Automating Compilation with jr
1.7 Automating Compilation with make
1.8 Automating Compilation with Ant
1.9 Running Applets
1.10 Dealing with Deprecation Warnings
1.11 Conditional Debugging without #ifdef
1.12 Debugging Printouts
1.13 Using a Debugger
1.14 Unit Testing: Avoid the Need for Debuggers
1.15 Decompiling Java Class Files
1.16 Preventing Others from Decompiling Your Java Files
1.17 Getting Readable Tracebacks
1.18 Finding More Java Source Code
1.19 Program: Debug
2. Interacting with the Environment
2.1 Introduction
2.2 Getting Environment Variables
2.3 System Properties
2.4 Writing JDK Release-Dependent Code
2.5 Writing Operating System-Dependent Code
2.6 Using CLASSPATH Effectively
2.7 Using Extensions or Other Packaged APIs
2.8 Parsing Command-Line Arguments
3. Strings and Things
3.1 Introduction
3.2 Taking Strings Apart with Substrings
3.3 Taking Strings Apart with StringTokenizer
3.4 Putting Strings Together with + and StringBuffer
3.5 Processing a String One Character at a Time
3.6 Aligning Strings
3.7 Converting Between Unicode Characters and Strings
3.8 Reversing a String by Word or Character
3.9 Expanding and Compressing Tabs
3.10 Controlling Case
3.11 Indenting Text Documents
3.12 Entering Non-Printable Characters
3.13 Trimming Blanks from the End of a String
3.14 Parsing Comma-Separated Data
3.15 Program: A Simple Text Formatter
3.16 Program: Soundex Name Comparisons
4. Pattern Matching with Regular Expressions
4.1 Introduction
4.2 Regular Expression Syntax
4.3 How REs Work in Practice
4.4 Using Regular Expressions in Java
4.5 Testing REs Interactively
4.6 Finding the Matching Text
4.7 Replacing the Matching Text
4.8 Printing All Occurrences of a Pattern
4.9 Printing Lines Containing a Pattern
4.10 Controlling Case in match( ) and subst( )
4.11 Precompiling the RE
4.12 Matching Newlines in Text
4.13 Program: Data Mining
4.14 Program: Full Grep
5. Numbers
5.1 Introduction
5.2 Checking Whether a String Is a Valid Number
5.3 Storing a Larger Number in a Smaller
5.4 Taking a Fraction of an Integer Without Using Floating Point
5.5 Ensuring the Accuracy of Floating-Point Numbers
5.6 Comparing Floating-Point Numbers
5.7 Rounding Floating-Point Numbers
5.8 Formatting Numbers
5.9 Converting Between Binary, Octal, Decimal, and Hexadecimal
5.10 Operating on a Series of Integers
5.11 Working with Roman Numerals
5.12 Formatting with Correct Plurals
5.13 Generating Random Numbers
5.14 Generating Better Random Numbers
5.15 Calculating Trigonometric Functions
5.16 Taking Logarithms
5.17 Multiplying Matrixes
5.18 Using Complex Numbers
5.19 Handling Very Large Numbers
5.20 Program: TempConverter
5.21 Program: Number Palindromes
6. Dates and Times
6.1 Introduction
6.2 Finding Today's Date
6.3 Printing Date/Time in a Specified Format
6.4 Representing Dates in Other Epochs
6.5 Converting YMDHMS to a Calendar or Epoch Seconds
6.6 Parsing Strings into Dates
6.7 Converting Epoch Seconds to DMYHMS
6.8 Adding to or Subtracting from a Date or Calendar
6.9 Difference Between Two Dates
6.10 Comparing Dates
6.11 Day of Week/Month/Year or Week Number
6.12 Calendar Page
6.13 High-Resolution Timers
6.14 Sleeping for a While
6.15 Program: Reminder Service
7. Structuring Data with Java
7.1 Introduction
7.2 Data Structuring Using Arrays
7.3 Resizing an Array
7.4 Like an Array, but More Dynamic
7.5 Data-Independent Access with Iterators
7.6 Structuring Data in a Linked List
7.7 Mapping with Hashtable and HashMap
7.8 Storing Strings in Properties and Preferences
7.9 Sorting a Collection
7.10 Sorting in Java 1.1
7.11 Avoiding the Urge to Sort
7.12 Sets
7.13 Finding an Object in a Collection
7.14 Converting a Collection to an Array
7.15 Rolling Your Own Iterator
7.16 Stack
7.17 Multidimensional Structures
7.18 Finally, Collections
7.19 Program: Timing Comparisons
8. Object-Oriented Techniques
8.1 Introduction
8.2 Printing Objects: Formatting with toString( )
8.3 Overriding the Equals Method
8.4 Overriding the Hashcode Method
8.5 The Clone Method
8.6 The Finalize Method
8.7 Using Inner Classes
8.8 Providing Callbacks via Interfaces
8.9 Polymorphism/Abstract Methods
8.10 Passing Values
8.11 Roll Your Own Exceptions
8.12 Program: Plotter
9. Input and Output
9.1 Introduction
9.2 Reading Standard Input
9.3 Writing Standard Output
9.4 Opening a File by Name
9.5 Copying a File
9.6 Reading a File into a String
9.7 Reassigning the Standard Streams
9.8 Duplicating a Stream as It Is Written
9.9 Reading/Writing a Different Character Set
9.10 Those Pesky End-of-Line Characters
9.11 Beware Platform-Dependent File Code
9.12 Reading "Continued" Lines
9.13 Scanning a File
9.14 Binary Data
9.15 Seeking
9.16 Writing Data Streams from C
9.17 Saving and Restoring Serialized Objects
9.18 Preventing ClassCastExceptions with SerialVersionUID
9.19 Reading and Writing JAR or Zip Archives
9.20 Reading and Writing Compressed Files
9.21 Program: Text to PostScript
9.22 Program: TarList (File Converter)
10. Directory and Filesystem Operations
10.1 Introduction
10.2 Getting File Information
10.3 Creating a File
10.4 Renaming a File
10.5 Deleting a File
10.6 Creating a Transient File
10.7 Changing File Attributes
10.8 Listing a Directory
10.9 Getting the Directory Roots
10.10 Making New Directories
10.11 Program: Find
11. Programming Serial and Parallel Ports
11.1 Introduction
11.2 Choosing a Port
11.3 Opening a Serial Port
11.4 Opening a Parallel Port
11.5 Resolving Port Conflicts
11.6 Reading and Writing: Lock Step
11.7 Reading and Writing: Event-Driven
11.8 Reading and Writing: Threads
11.9 Program: Penman Plotter
12. Graphics and Sound
12.1 Introduction
12.2 Painting with a Graphics Object
12.3 Testing Graphical Components
12.4 Drawing Text
12.5 Drawing Centered Text in a Component
12.6 Drawing a Drop Shadow
12.7 Drawing an Image
12.8 Playing a Sound File
12.9 Displaying a Moving Image with Video
12.10 Drawing Text with 2D
剩余710页未读,继续阅读
资源评论
- xuhongping1082014-12-25不错,找到了我想看的
铁猴
- 粉丝: 1338
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- YOLOV4-TINY权重文件
- 以下是一个使用贪心算法解决多机调度问题的基本步骤0.txt
- 基于大数据的房产估价是近年来随着技术的发展而兴起的一种新型估价方法.txt
- 企业供应链管理系统v3.rar
- 富芮坤FR8016HA蓝牙开发板使用手册+硬件PCB图+封装库+DEMO演示软件源代码.zip
- 基于YOLOv7的芯片表面缺陷检测系统
- 京东物流 数字化供应链综合研究报告2018.rar
- 基于YOLOv7的植物虫害识别&防治系统
- 2000.1-2023.8中国经济政策不确定性指数月度数据.xlsx
- Screenshot_2024-04-21-20-42-15-443_com.tencent.mm.jpg
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功