- Language basics
- Standard library
- Hash Map
- Random numbers
- Error handling
- Tricks of the trade
- Cheat sheets
Methods and lambdas
Classes and interfaces
- Exceptions: Throw, Try and Catch
- Exception Types
- Keyword: try
- Keyword: catch
- Keyword: finally
- Keyword: throw
- Keyword: throws
- try + finally
- Convert enum to and from int
- Convert enum to and from string
- Where's the javadoc for values and valueOf methods on enums?!
- What does final mean, and are final variables always immutable?
- What is effectively final?
- When to create a final class
- Drawing multiline strings with Graphics java.awt
- Java2D: Increasing line width java.awt
- Find number of regex matches in a String java.util.regex
- Converting a char to an int
- How to split a String into an ArrayList
- Remove duplicate whitespace in strings
- Finding the Nth occurrence of a substring in a String
- Collections.emptyList vs new ArrayList
- Initialize list with zeroes
- Removing a range of elements from a list
- Removing elements from multiple indexes in a list
- Removing trailing comma from comma separated string
- Passing a list as argument to a vararg method
- Generating a random number of a certain length
- Random with a random seed
- Generating a random char (a-z)
- Generating a random String (password, booking reference, etc)
- Checked Exceptions: Good or Bad?
- Difference between Checked and Unchecked Exceptions
- Choosing between Checked and Unchecked Exceptions
- Return Values vs Exceptions
- Custom Exception
- Chained Exceptions
- throw vs throws vs Throwable
- Suppressed Exceptions
- Stack Traces
- Java Stack Traces: Unknown Source
Tricks of the trade
- Accessing private fields through reflection
- Accessing private fields of superclass through reflection
- Creating a custom event
- Formatting byte size to human readable format
- Generating competition rankings
- Is it wrong to use deprecated methods or classes?
- Local methods (or submethods, or inner methods, or nested methods)
- N-gram generation
- Opening a URL in Android's web browser from within application
- Testing array equality
- Using C style macros in Java
- What exactly is immutable?
- When should I override equals?
- Why can I access private fields of other objects?
- Executing code in comments?!
- Print null
- Why's Double.MIN_VALUE is positive? Integer.MIN_VALUE is negative!
- Wrong results for division?
- Abstract interfaces and abstract interface methods