André Felipe Costa Bentobentodev.hashnode.dev·9 hours agoGenerics in Java: Enhancing Code Safety and FlexibilityThe Generics feature was introduced in Java version 5.0 and quickly became one of the most powerful tools in a Java developer's toolkit. Generics allow classes, interfaces, and methods to be parameterized by types. This functionality not only increas...DiscussJava
Asha Johnashajohn.hashnode.dev·May 6, 2024Basics of Generics in C#A generic collection in C# is a collection type that is designed to work with any data type, rather than being specific to one type. Generics are mainly used to create type-safe and efficient classes and methods. Generics help us to pass type as para...Discuss·1 like·73 readsC#
Chetan Dattachetan77.hashnode.dev·May 5, 202408 Java - Classes (Part II - Generic Class)Introduction to Generic Classes If we have an object with a field of type Object, then this object can hold any type of class because Object is the parent class of all classes. Therefore, when accessing the field of this class, we should be careful b...DiscussJavaJava class
Balashankar Gujjabalashankargujja.hashnode.dev·Mar 23, 2024C# GenericsIn C#, the term “generic” refers to a type that is not limited to a specific data type. They allow you to define classes, interfaces, and methods with placeholders for data types. This enables you to create reusable, type-safe code that can work with...Discuss·196 readsC#generics
Harish Selvaharishselva.hashnode.dev·Mar 18, 2024Unveiling the Magic: A Journey into the World of Java GenericsIntroduction: Welcome, fellow adventurers, to a realm where type safety meets flexibility, where the power of abstraction reigns supreme—the realm of Java Generics! In this enchanting journey, we'll embark on a quest to unravel the mysteries of type ...DiscussJava
Kirusekirudev.hashnode.dev·Feb 26, 2024REST EasySome time ago, I got so frustrated with an "API library" I had intended to use for a spare-time project that I just said "screw this" and spent 2 extra weeks writing my own. It was an abstraction layer for a REST API + a WebSockets API. Here, I'll fo...DiscussREST API
Giovanna Moellergiovannamoeller.hashnode.dev·Feb 6, 2024Generics in Swift: Expanding Flexibility and Code ReusabilityIntroduction Generics are a powerful feature in Swift that allow for the creation of flexible, reusable, and type-safe code, avoiding duplication and enhancing clarity. In this article, I will explore the motivation behind using generics, introduce t...DiscussSwift
Yadvir Kauryadvirkaur.hashnode.dev·Feb 5, 2024The Power of Generic Hooks in React Data FetchingHello! Welcome back! In my previous post, we created a custom hook, like 'useUsers', to fetch data from a specific endpoint, say '/users'. But what if we need data from different endpoints like '/posts'? We'd end up writing similar custom hooks, intr...Discuss·38 readsgeneric hooks
becomingiOSbecomingios.com·Feb 4, 2024Swift GenericsSwift generics are a powerful way to write flexible, reusable code that avoids duplication. Understanding generics allows you to craft elegant solutions to complex problems. In this article, I'll cover the basics of generics in Swift and how you can ...DiscussiOS
Jiwon Yujingwangjjang.hashnode.dev·Jan 28, 2024[TypeScript] What is Generics?In the world of TypeScript, generics provide a powerful way to write reusable and flexible code. Generics allow you to create functions, classes, and interfaces that work with a variety of types, providing better type safety and enabling the creation...DiscussTypeScript