Video is locked.

Unlock the full course today

Join today to access over 16,000 courses taught by industry experts or purchase this course individually.

Advanced Java Programming

Storing pairs with HashMaps

From the course: Advanced Java Programming

Start my 1-month free trial
  • Course details

    Want to get more out of the Java language and platform? In this platform- and framework-neutral course, instructor Bethan Palmer digs into some of the language’s more advanced features, helping you expand your programming skills as she equips you with techniques you can use when building applications anywhere Java is used: in web, mobile, and desktop applications. Bethan covers a variety of topics, including generics, working with the Collections Framework, and functional programming. Plus, learn about I/O in Java, working with files and directories, and structuring applications using the modular system available in Java.


    • Click here to view Bethan Palmer’s instructor page

      Bethan Palmer

      Software Developer and Java Champion

      Bethan Palmer is a developer who loves technology and has a master's degree in computer science.

      For her day job, Bethan is a Java programmer and the product manager for a Java PDF library at IDRsolutions. She gets to spend a lot of time writing and refactoring code, as well as deciding on product strategy and road maps.

      She also spends much of her time attending conferences and is a regular speaker at Oracle Code One and NetBeans Days. She manages and writes articles about Java, technology, the books she's reading, and conferences she's attending on the Java PDF blog.

    Skills covered in this course

  • Learn advanced Java programming

    - [Instructor] Hashmaps are a common data structure used in Java programing. They allow you to store pairs of values together. One example use for a hashmap is a phone book. I could create a hashmap where the name of the contacts was the key, and the phone number was the value. To do this, in my main method in the hashmap example class I will create a hashmap variable. Inside the angle brackets after hashmap, I will specify that the key should be of type string and the value should be of type integer. (keyboard clicks) I will call the variable phone book. (keyboard clicks) And I will assign it to a new instance of hashmap. (keyboard clicks) To add values to the hashmap, I'll use the put method. For example, I can do phonebook.put and parse in Kevin as the key, and then parse in an integer such as 12345 as the phone number. (keyboard clicks) I can then add as many values as I like. I will add a contact called Jill who's number is 98765, (keyboard clicks) and a contact called Brenda…

  • Practice while you learn with exercise files

    Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.

    Download the exercise files for this course. Get started with a free trial today.

  • Download courses and learn on the go

    Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.

    Watch this course anytime, anywhere. Get started with a free trial today.