Java guides
Every published Java guide, newest first, with practical examples you can copy into your own project.
3,965 guides across 14 topics
Topics
Popular Java guides
Most readLatest Java guides
Page 93 of 109Java Arrays.deepEquals: Nested Array Comparison
Learn how Arrays.deepEquals compares nested and multi-dimensional arrays in Java, how it differs from Arrays.equals, and when to choose each method.
Java Arrays equals: Comparing Contents Correctly
Learn why a Java array's equals() compares references, not contents, and how Arrays.equals() and Arrays.deepEquals() compare array contents correctly.
Java Array vs ArrayList: Choosing the Right Structure
Compare Java arrays and ArrayLists on syntax, resizing, generics, performance, and memory. Learn which structure fits your use case.
Java Array Default Values: Initial State and Behavior
Java arrays created with `new` are initialized before assignment: numeric primitives contain zero, booleans contain false, chars contain the null character, and references contain null. Learn how to handle these defaults in code.
Java Array of Objects: Declaration and Usage
Learn how to declare, populate, iterate, and manage arrays of objects in Java, including null handling, memory behavior, and when to prefer ArrayList.
Java Jagged Array: Syntax and Usage
java jagged array: Learn how to declare, allocate, and iterate jagged arrays in Java, including memory tradeoffs, common pitfalls, and when to prefer collections.
Java Two-Dimensional Array: Syntax, Memory, and Iteration
How to declare, initialize, and iterate a Java two-dimensional array, including ragged arrays, deep copying, and memory behavior.
Java Multidimensional Array: Arrays of Arrays
Learn how to declare, initialize, and work with multidimensional arrays in Java, including jagged arrays, copying, and performance considerations.
Java Array Contains: How to Check Membership
java array contains: Practical techniques to check if a Java array contains a value, covering primitive and object arrays, performance tradeoffs, and edge cases.
Java Arrays.binarySearch: Usage and Common Pitfalls
How to use Arrays.binarySearch in Java, understand its return value, handle edge cases, and compare it with alternatives.