Java programming examples
Run Java examples that swap numbers, check palindromes, and use the standard library for dates, files, collections and asynchronous results.
Java library examples
- Build and inspect an HTTP request
- Calculate a renewal across February
- Combine two independent subtotals
- Count XML records by element name
- Count characters in a shipping label
- Decode an unsigned two-byte count
- Decode the insertion point of a missing key
- Describe a JDBC row without a database
- Detect overflow before recording a total
- Distinguish a zero price from a missing price
- Extract invoice numbers with a named group
- Find a maximum when a stream may be empty
- Group successful orders by customer
- Handle a full work queue
- Preserve empty fields in an order record
- Read the channels of a pixel
- Recover a failed asynchronous result
- Round an invoice tie in cents
- Round-trip a Unicode label through Base64
- Round-trip a compressed report
- Sort and compare text with an explicit locale
- Test a deadline at the exact cutoff