Tag

JDK7

0 views collected around this technical thread.

Java Tech Enthusiast
Java Tech Enthusiast
Oct 10, 2024 · Fundamentals

Understanding Try-with-Resources in Java: A Comprehensive Guide

This guide explains Java's try-with-resources statement introduced in JDK 7, showing how it automatically closes AutoCloseable resources, eliminates boilerplate finally blocks, manages closure order and suppressed exceptions, avoids common decorator pitfalls, and provides best‑practice examples for robust production code.

AutoCloseableException HandlingJDK7
0 likes · 10 min read
Understanding Try-with-Resources in Java: A Comprehensive Guide
Selected Java Interview Questions
Selected Java Interview Questions
May 30, 2022 · Backend Development

Understanding Java ConcurrentHashMap: Implementation, Locking, and Performance

This article explains the shortcomings of HashMap, compares Hashtable, synchronizedMap, and ConcurrentHashMap implementations in JDK 7 and JDK 8, discusses lock states, fail‑fast vs fail‑safe behavior, and provides code examples and optimization tips for thread‑safe map operations.

ConcurrentHashMapJDK7JDK8
0 likes · 12 min read
Understanding Java ConcurrentHashMap: Implementation, Locking, and Performance
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 14, 2021 · Fundamentals

Analyzing the Dead Loop Issue in JDK 1.7 HashMap and Its Resolution in JDK 1.8

This article explains why the pre‑JDK 1.8 HashMap can enter an infinite loop during concurrent resizing, illustrates the problem with detailed step‑by‑step diagrams, and shows how JDK 1.8 redesigns the resize algorithm to prevent the loop.

DataStructuresDeadLoopHashMap
0 likes · 5 min read
Analyzing the Dead Loop Issue in JDK 1.7 HashMap and Its Resolution in JDK 1.8
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 26, 2020 · Fundamentals

Understanding ConcurrentHashMap: Implementation Differences between JDK 1.7 and JDK 1.8

This article explains why ConcurrentHashMap provides thread‑safe and high‑performance map operations, compares it with HashMap and Hashtable, and details the architectural changes from JDK 1.7’s segment‑lock design to JDK 1.8’s array‑list‑red‑black‑tree and CAS‑based implementation.

ConcurrentHashMapJDK7JDK8
0 likes · 7 min read
Understanding ConcurrentHashMap: Implementation Differences between JDK 1.7 and JDK 1.8
Selected Java Interview Questions
Selected Java Interview Questions
Dec 4, 2019 · Fundamentals

Understanding Java HashMap: Implementation Principles, JDK7 Source Walkthrough, and Interview Insights

This article explains the fundamentals of hash tables, dives deep into Java's HashMap implementation—including JDK7 source code analysis of its internal structures, resizing logic, and key methods—while also covering common interview questions such as why the array size must be a power of two and the necessity of overriding both equals and hashCode.

HashCodeHashMapJDK7
0 likes · 19 min read
Understanding Java HashMap: Implementation Principles, JDK7 Source Walkthrough, and Interview Insights
Selected Java Interview Questions
Selected Java Interview Questions
Nov 15, 2019 · Fundamentals

Why HashMap Is Not Thread‑Safe in JDK 1.7 and JDK 1.8: Dead‑Loop and Data‑Loss Analysis

This article explains the thread‑safety problems of Java's HashMap in JDK 1.7 and JDK 1.8, showing how concurrent resize operations can create circular linked lists, cause infinite loops or data loss, and why the underlying implementation remains unsafe despite JDK 1.8's optimizations.

ConcurrencyHashMapJDK7
0 likes · 9 min read
Why HashMap Is Not Thread‑Safe in JDK 1.7 and JDK 1.8: Dead‑Loop and Data‑Loss Analysis
Qunar Tech Salon
Qunar Tech Salon
May 2, 2016 · Backend Development

Using JDK7 Standard Library for Flexible and Secure File Handling in Java

This article demonstrates how to leverage JDK7's standard library—Path, Paths, Files, and FileSystem—to perform flexible file operations, safe path concatenation, size‑checked reading, automatic resource management, directory traversal with FileVisitor, and security measures for preventing unsafe file access.

BackendFile I/OJDK7
0 likes · 7 min read
Using JDK7 Standard Library for Flexible and Secure File Handling in Java
Qunar Tech Salon
Qunar Tech Salon
Dec 24, 2014 · Fundamentals

Understanding Java String.substring Memory Leak in JDK 6 and Its Fix in JDK 7

This article explains how the original JDK 6 implementation of String.substring could retain large character arrays and cause apparent memory‑leak‑like OutOfMemoryError, describes the underlying fields, reproduces the issue, and shows how JDK 7’s copy‑on‑substring redesign resolves the problem.

Garbage CollectionJDK6JDK7
0 likes · 10 min read
Understanding Java String.substring Memory Leak in JDK 6 and Its Fix in JDK 7