How to Program with Java – Podcast Episode 4

by Trevor Page on October 3, 2012

Data Structures


In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.

- the key here is that data structures use data efficiently
- different data structures are best suited to different situations
- reduces the amount of variables

What kinds of ways could you organize data?

- List
- Map
- Set

- These are known as Collections (generic term)

- List – Store bunch of items for later iteration
- Map – For a given (something) what is the (something else) – key/value
- Set – Used to maintain a unique List

List Example – Contacts

Map Example –
“Honda” -> “Civic”, “Prelude”
“Toyota” -> “Corolla”, “Celica”, “Rav4″
“Ford” -> “Focus”, “Mustang”
“Audi” -> “R8″

Set Example – Check to see which words were used in a sentence

Interesting Note: You can use one Collection inside of another


Interesting Links:

{ 10 comments… read them below or add one }

Lam October 7, 2012 at 11:03 am

Hey Trev, your site and weekly posts are great and very helpful. This makes the initial stage into programming more enjoyable. Thank you and keep up with the good work


Trevor Page October 7, 2012 at 11:11 am

Always a pleasure Lam, I’m glad you find these tutorials helpful, keep up the learning!


Norman October 13, 2012 at 8:30 pm

hey Trevor, thanks a lot! I have been listening to your podcasts and you have cleared a lot of stuff for me already Im only starting to understand better (even after Barnes & Kolling).
keep up the good work! cant wait for your next podcast!


Trevor Page October 14, 2012 at 9:27 am

Thanks Norman, that’s some great feedback, I really appreciate it!

I have been so stupidly busy this past week, but I’m going to try and get a new podcast episode recorded and released in the next 12 hours :)


Trevor Page October 14, 2012 at 11:12 am

PS… thanks for buying my eBook, now I *really* have to record an episode for you ;)


naftaly ngari February 22, 2013 at 10:29 pm

trevor you are a great teacher and i have just started learning programming and with these podcasts and tutorials i will be a good programmer. i could not even get started because i met one lecturer who made me think that programming is only for the very bright students and i had to quit . but now i know i will go far. thank you and God bless you keep up with your good work.


Trevor Page February 23, 2013 at 10:18 am

Clearly that lecturer wants to think that he’s smarter than he actually is! Good for you for ignoring him and pushing forward, it shows that you’ve got a good head on your shoulders.

Let me know if you have any questions about programming, I’ll be glad to help you out.


Jonathan October 20, 2013 at 3:21 pm

BTW, the page title says “Control Structures”, not “Data Structures”. Confused me for a little bit.


uday August 27, 2014 at 9:57 pm

I like your podcasts. Thanks for sharing very good java class.
I really like it very much. It is possible to contact you via email?



Trevor Page August 30, 2014 at 9:31 am

Sure thing, you can hop on my email list here.


Leave a Comment

Powered by sweet Captcha

Previous post:

Next post: