Introduction to Java Through Game Development by 2023
Author:2023
Language: eng
Format: epub
CHAPTER 5
More Data Structures
Welcome to Chapter 5! In this chapter, weâll spend some more time exploring some common data structures provided by the Java programming language. A brief summary of the data structures weâll cover in this chapter is as follows:
⢠Multidimensional Arrays: Similar to the arrays you worked with
prior to this chapter, just with more dimensions, allowing us to map
tabular data, etc.
⢠Hashes: A very useful data structure that can be thought of as a
dictionary. Hashes store key-value pairs. Hashes are sometimes
referred to by their actual Java class name, Hashtable, or the
colloquial term, dictionary.
⢠Stacks: An important data structure that allows push and pop access
to a stack of values. These are the first data structures weâve seen that remove their elements when they are accessed. They also have the
property that they return the element for you with a method call.
⢠Queues: Last but not least, the queue is a data structure you should be familiar with if youâve ever had to wait in line for something. A
queue provides add or remove access to a list of values.
**Java Programming Note: All the data structures used in the text are either core features of the Java programming language or are contained in the java.util package. Add the line import java.util.* to use these classes in your programs.
Recall from our review in Chapter 3 that data structures are more advanced data types that hold other variables. Normally, data structures would be considered outside the scope of an introductory programming language text, but I feel that a gentle 111
© Victor G. Brusca 2023
V. G. Brusca, Introduction to Java Through Game Development, https://doi.org/10.1007/978-1-4842-8951-8_5
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12563)
Hello! Python by Anthony Briggs(9911)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9794)
The Mikado Method by Ola Ellnestam Daniel Brolund(9775)
Dependency Injection in .NET by Mark Seemann(9335)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8292)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7758)
Grails in Action by Glen Smith Peter Ledbrook(7693)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7016)
Microservices with Go by Alexander Shuiskov(6783)
Practical Design Patterns for Java Developers by Miroslav Wengner(6696)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6636)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6409)
Angular Projects - Third Edition by Aristeidis Bampakos(6045)
The Art of Crafting User Stories by The Art of Crafting User Stories(5575)
NetSuite for Consultants - Second Edition by Peter Ries(5508)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5309)
Kotlin in Action by Dmitry Jemerov(5061)
