Tag

collections

0 views collected around this technical thread.

AndroidPub
AndroidPub
Jun 13, 2025 · Fundamentals

Simplify Kotlin Collections Creation with buildList, buildSet, and buildMap

This article explains how Kotlin's standard library provides concise builder functions such as buildList, buildSet, buildMap, and buildString to create immutable collections and strings efficiently, reducing boilerplate and eliminating lambda overhead while offering specialized variants for primitive types.

Kotlinbuilder-functionscollections
0 likes · 7 min read
Simplify Kotlin Collections Creation with buildList, buildSet, and buildMap
Architect's Guide
Architect's Guide
Mar 26, 2025 · Fundamentals

Avoiding the Fixed‑Size List Pitfall of Arrays.asList in Java

This article explains why using Arrays.asList to convert an array into a List can produce an immutable, fixed‑size list that throws UnsupportedOperationException on add or remove operations, illustrates the issue with real‑world incident details, analyzes the internal implementation, and provides a safe replacement using java.util.ArrayList.

ArrayListArrays.asListBest Practices
0 likes · 9 min read
Avoiding the Fixed‑Size List Pitfall of Arrays.asList in Java
Architecture Digest
Architecture Digest
Mar 18, 2025 · Fundamentals

Understanding Java foreach Loop, HashMap Iteration, and ConcurrentModificationException

This article explains how Java's foreach loop is implemented using iterators, demonstrates the bytecode differences between array and collection traversal, analyzes why modifying a HashMap during foreach can trigger ConcurrentModificationException, and shows the correct way to safely modify collections with an iterator.

ConcurrentModificationExceptionHashMapIterator
0 likes · 11 min read
Understanding Java foreach Loop, HashMap Iteration, and ConcurrentModificationException
Python Programming Learning Circle
Python Programming Learning Circle
Mar 12, 2025 · Fundamentals

Python Essentials: Strings, Collections, Iterators, and Decorators

This article presents a comprehensive collection of Python fundamentals, covering useful string methods like partition and translate, mutable versus immutable types and argument passing, tuple unpacking, dictionary utilities, set operations, iterator implementations, best practices for exception handling, and various decorator techniques with practical code examples.

IteratorsPythoncollections
0 likes · 16 min read
Python Essentials: Strings, Collections, Iterators, and Decorators
Java Tech Enthusiast
Java Tech Enthusiast
Mar 4, 2025 · Fundamentals

Java 8 Map API Enhancements

Java 8 enriches the Map interface with default methods such as getOrDefault, forEach, merge, putIfAbsent, compute, computeIfAbsent, computeIfPresent and replace, allowing developers to retrieve values with fallbacks, iterate entries, combine or conditionally update entries, and thus write more concise, readable code with far less boilerplate.

APIJDK8Java
0 likes · 9 min read
Java 8 Map API Enhancements
Python Programming Learning Circle
Python Programming Learning Circle
Feb 27, 2025 · Fundamentals

Effective Use of Python Type Hints: Basics, Optional, Collections, Unions, and Any

This article explains how to apply Python type hints—including basic types, the modern pipe syntax for optional values, collection generics, union types, and the flexible Any type—through clear examples and best‑practice guidance to make code more readable and safer.

Optionalanycollections
0 likes · 6 min read
Effective Use of Python Type Hints: Basics, Optional, Collections, Unions, and Any
macrozheng
macrozheng
Feb 10, 2025 · Backend Development

Why Arrays.asList() Can Crash Your Java App and How to Fix It

This article explains how using Arrays.asList() to convert an array into a List creates a fixed‑size collection that throws UnsupportedOperationException on add or remove operations, illustrates the issue with a real e‑commerce incident, and shows how to safely wrap the result with a mutable java.util.ArrayList.

ArrayListArrays.asListBackend Development
0 likes · 9 min read
Why Arrays.asList() Can Crash Your Java App and How to Fix It
php中文网 Courses
php中文网 Courses
Feb 6, 2025 · Backend Development

Data Structures in PHP and Laravel: Best Practices and Optimization

This article examines core and advanced data structures in PHP and Laravel, demonstrating how arrays, associative and multidimensional arrays, collections, and JSON storage can be leveraged with practical code examples and query‑optimization techniques to build efficient, scalable, and maintainable web applications.

Data StructuresLaravelcollections
0 likes · 7 min read
Data Structures in PHP and Laravel: Best Practices and Optimization
Python Programming Learning Circle
Python Programming Learning Circle
Jan 7, 2025 · Fundamentals

Python Tips and Tricks: Variable Swapping, Comprehensions, Counter, JSON Pretty‑Print, FizzBuzz, and More

This article presents a collection of practical Python techniques—including one‑line variable swapping, list, set and dictionary comprehensions, the Counter class for counting, pretty‑printing JSON, inline conditional expressions, list slicing, itertools combinations, and a quirky False‑equals‑True example—each illustrated with concise code snippets and explanations.

Data StructuresJSONcollections
0 likes · 9 min read
Python Tips and Tricks: Variable Swapping, Comprehensions, Counter, JSON Pretty‑Print, FizzBuzz, and More
macrozheng
macrozheng
Dec 30, 2024 · Backend Development

Master Java Stream API: From Basics to Advanced Collection Operations

This article introduces Java Stream API introduced in JDK 8, explains its pipeline concept, and demonstrates practical operations such as traversal, filtering, deduplication, type conversion, collection‑to‑map transformations, pagination, matching, and parallel processing with clear code examples.

JavaJava8Stream API
0 likes · 15 min read
Master Java Stream API: From Basics to Advanced Collection Operations
Selected Java Interview Questions
Selected Java Interview Questions
Dec 22, 2024 · Backend Development

Choosing Between Optional.ofNullable and Traditional Null Checks in Java

The article compares using Optional.ofNullable with map() versus a traditional null‑check ternary operator for retrieving a Hyperlink's link property, evaluates their readability, performance, and suitability, and extends the discussion to native versus utility‑based collection‑empty checks in Java.

JavaOptionalcode-style
0 likes · 6 min read
Choosing Between Optional.ofNullable and Traditional Null Checks in Java
Test Development Learning Exchange
Test Development Learning Exchange
Dec 9, 2024 · Fundamentals

Python Lists: Creation, Operations, and Comparison with Strings and Sets

This article provides a comprehensive guide to Python lists, covering creation, element access, modification, slicing, adding/removing elements, sorting, length, list comprehensions, and comparisons with strings and sets.

Data StructuresListsMutable Data Types
0 likes · 9 min read
Python Lists: Creation, Operations, and Comparison with Strings and Sets
Architecture Digest
Architecture Digest
Dec 9, 2024 · Fundamentals

Efficient Null Checks in Java Using Utility Classes

This article explains how to efficiently perform null checks in Java by selecting appropriate utility classes such as StringUtils, ObjectUtils, Collections, and CollectionUtils for different data types, and also includes a brief notice about a free programmer book giveaway.

JavaObjectUtilsStringUtils
0 likes · 9 min read
Efficient Null Checks in Java Using Utility Classes
Top Architect
Top Architect
Nov 28, 2024 · Backend Development

A Comprehensive Guide to Java Enums: Basics, Advanced Usage, and Design Patterns

This article explains Java enums introduced in Java 5, shows how to define simple and complex enum types, demonstrates their use in comparisons, switch statements, collections like EnumSet and EnumMap, and illustrates applying enums to design patterns such as Singleton and Strategy, while providing practical code examples and JSON serialization techniques.

EnumJavabackend
0 likes · 16 min read
A Comprehensive Guide to Java Enums: Basics, Advanced Usage, and Design Patterns
Python Programming Learning Circle
Python Programming Learning Circle
Nov 23, 2024 · Fundamentals

Advanced Python Concepts: Exception Handling, Collections, itertools, Lambdas, Decorators, Generators, Threads, Dunder Methods, Logging, and Context Managers

This article introduces ten advanced Python topics—including exception handling, the collections and itertools modules, lambda functions, decorators, generators, threading, dunder methods, logging, and context managers—providing explanations, code examples, and practical tips to help developers deepen their programming skills and prepare for interviews.

AdvancedGeneratorsPython
0 likes · 13 min read
Advanced Python Concepts: Exception Handling, Collections, itertools, Lambdas, Decorators, Generators, Threads, Dunder Methods, Logging, and Context Managers
Java Captain
Java Captain
Nov 19, 2024 · Backend Development

Optimizing Nested Loop Data Matching with a Map in Java

This article demonstrates how replacing a costly nested‑loop search for matching user IDs with a pre‑built HashMap dramatically reduces processing time from tens of seconds to a few seconds, explaining the underlying time‑complexity benefits and providing complete Java code examples.

HashMapJavacollections
0 likes · 6 min read
Optimizing Nested Loop Data Matching with a Map in Java
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 19, 2024 · Fundamentals

Mastering Java Map: 12 Powerful Methods Every Developer Should Know

This article introduces Java's Map interface, explains the expanded API added since Java 8, and provides practical code examples for methods such as getOrDefault, forEach, replaceAll, computeIfAbsent, merge, and the immutable factories introduced in Java 9, helping developers deepen their collection framework knowledge.

JavaJava8backend
0 likes · 10 min read
Mastering Java Map: 12 Powerful Methods Every Developer Should Know