Skip to Content
Aprender Java, 6ª Edición
book

Aprender Java, 6ª Edición

by Marc Loy, Patrick Niemeyer, Daniel Leuck
September 2024
Intermediate to advanced
552 pages
16h 34m
Spanish
O'Reilly Media, Inc.
Content preview from Aprender Java, 6ª Edición

Capítulo 7. Colecciones y genéricos

Este trabajo se ha traducido utilizando IA. Agradecemos tus opiniones y comentarios: translation-feedback@oreilly.com

A medida que empecemos a utilizar nuestro creciente conocimiento de los objetos para manejar problemas cada vez más interesantes, surgirá una pregunta recurrente. ¿Cómo almacenamos los datos que manipulamos al resolver esos problemas? Sin duda utilizaremos variables de todos los tipos, pero también necesitaremos opciones de almacenamiento más grandes y sofisticadas. Las matrices de las que hablamos en "Matrices" son un comienzo, pero las matrices tienen algunas limitaciones. En este capítulo veremos cómo conseguir un acceso eficaz y flexible a grandes cantidades de datos utilizando la idea de Java de las colecciones. También veremos cómo tratar los distintos tipos de datos que queremos almacenar en estos grandes contenedores como hacemos con los valores individuales en variables. Ahí es donde entran en juego los genéricos. Llegaremos a ellos en "Limitaciones de tipo".

Colecciones

Las colecciones son estructuras de datos fundamentales en todo tipo de programación. Siempre que necesitemos referirnos a un grupo de objetos, tendremos algún tipo de colección. En el nivel básico del lenguaje, Java admite colecciones en forma de matrices. Pero las matrices son estáticas y, como tienen una longitud fija, resultan incómodas para grupos de cosas que crecen y decrecen a lo largo de la vida de una aplicación. Las matrices también son malas ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Recetas Java modernas

Recetas Java modernas

Ken Kousen
Sistemas reactivos en Java

Sistemas reactivos en Java

Clement Escoffier, Ken Finnigan
Herramientas DevOps para desarrolladores Java

Herramientas DevOps para desarrolladores Java

Stephen Chin, Melissa McKay, Ixchel Ruiz, Baruch Sadogursky

Publisher Resources

ISBN: 9781098181642