🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀 New videos dropping every week—start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Community Projects
    • Live Sessions
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Community Projects Live Sessions Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • Morgan D'Antoni
    Morgan D'Antoni
    1,183 Points

    What is iae.getMessage() and how does it work?

    Posted November 19, 2021 5:39pm by Morgan D'Antoni
    Morgan D'Antoni
    1,183 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Jasper Kop
    Jasper Kop
    10,423 Points

    Why ar you using printf instead of println?

    Posted November 10, 2020 11:09am by Jasper Kop
    Jasper Kop
    10,423 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Antonio Foresta
    Antonio Foresta
    931 Points

    I'm not sure what the role of this method in this class is

    Posted April 26, 2020 7:05pm by Antonio Foresta
    Antonio Foresta
    931 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    2 Answers

  • Graham Hornecker
    Graham Hornecker
    10,849 Points

    PezDispenser.java:18: error: cannot find symbol

    Posted November 7, 2019 5:17pm by Graham Hornecker
    Graham Hornecker
    10,849 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Dinu Comendant
    Dinu Comendant
    6,049 Points

    Question about the challenge

    Posted January 23, 2019 3:05pm by Dinu Comendant
    Dinu Comendant
    6,049 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    2 Answers

  • luis cantu
    luis cantu
    927 Points

    If I use System.Out.Println in the try and catch block the execution fails, Why has to use Println and then Printf ?

    Posted October 18, 2018 3:17am by luis cantu
    luis cantu
    927 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    2 Answers

  • victor medina
    victor medina
    540 Points

    Example.java:34: error: cannot find symbol. need help were is the error.

    Posted July 25, 2018 1:46am by victor medina
    victor medina
    540 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Bob Allan
    Bob Allan
    10,900 Points

    Why do Example.java and PezDispenser.java run at the same time?

    Posted May 20, 2018 1:38am by Bob Allan
    Bob Allan
    10,900 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • yeoyeon kim
    yeoyeon kim
    2,586 Points

    fill(int pezAmount) method

    Posted April 14, 2018 11:05pm by yeoyeon kim
    yeoyeon kim
    2,586 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Mayur Lalwani
    Mayur Lalwani
    9,074 Points

    Error in Exception

    Posted March 9, 2018 12:22pm by Mayur Lalwani
    Mayur Lalwani
    9,074 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Andre Kucharzyk
    Andre Kucharzyk
    4,479 Points

    what is "iae" in catch (IllegalArgumentException iae)?

    Posted February 8, 2018 11:28pm by Andre Kucharzyk
    Andre Kucharzyk
    4,479 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    5 Answers

  • Valentin Dugan
    Valentin Dugan
    3,467 Points

    Why there`s an error when Craig set parameters of fill (400). Is because MAX_PEZ set value of 12 ?

    Posted January 23, 2018 11:02pm by Valentin Dugan
    Valentin Dugan
    3,467 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • disheng wang
    disheng wang
    5,422 Points

    Exception vs System.exit(0)

    Posted October 29, 2017 9:28am by disheng wang
    disheng wang
    5,422 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Tobi Rydlewicz
    Tobi Rydlewicz
    855 Points

    Print ("Error was %s", iae.getMessage());

    Posted July 26, 2017 1:49pm by Tobi Rydlewicz
    Tobi Rydlewicz
    855 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Siu KWAN Yuen
    PLUS
    Siu KWAN Yuen
    Courses Plus Student 2,898 Points

    workspace snapshot

    Posted July 12, 2017 10:44am by Siu KWAN Yuen
    Siu KWAN Yuen
    Courses Plus Student 2,898 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    3 Answers

  • Sayan Karmakar
    Sayan Karmakar
    636 Points

    Example.java

    Posted May 25, 2017 6:27am by Sayan Karmakar
    Sayan Karmakar
    636 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    0 Answers

  • Rafic Rifai
    Rafic Rifai
    488 Points

    I cant figure out what i am doing wrong in the last exercise!! please help

    Posted May 21, 2017 11:08pm by Rafic Rifai
    Rafic Rifai
    488 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    2 Answers

  • Wan Nor Adzahari Wan Tajuddin
    Wan Nor Adzahari Wan Tajuddin
    2,438 Points

    getMessage method ?

    Posted May 17, 2017 6:00pm by Wan Nor Adzahari Wan Tajuddin
    Wan Nor Adzahari Wan Tajuddin
    2,438 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Jacob Leatherwood
    PLUS
    Jacob Leatherwood
    Courses Plus Student 467 Points

    there is no try errors...

    Posted April 25, 2017 2:50am by Jacob Leatherwood
    Jacob Leatherwood
    Courses Plus Student 467 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Laura Mckay
    Laura Mckay
    599 Points

    Can't get part of my code to run!

    Posted March 17, 2017 8:32pm by Laura Mckay
    Laura Mckay
    599 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Hussein Darwish
    Hussein Darwish
    631 Points

    what's meant by bubbling?

    Posted March 14, 2017 1:23pm by Hussein Darwish
    Hussein Darwish
    631 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Haisem Jemal
    Haisem Jemal
    631 Points

    Whats the point of exceptions?

    Posted February 26, 2017 1:34am by Haisem Jemal
    Haisem Jemal
    631 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    2 Answers

  • Michael Dinkins
    Michael Dinkins
    9,483 Points

    i am having issues with one of my variables. Please help

    Posted February 6, 2017 4:15pm by Michael Dinkins
    Michael Dinkins
    9,483 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Varun Singh
    Varun Singh
    1,905 Points

    What if i do not put "pezCount = newAmount " and instead if put " pezCount += pezAmount" ??

    Posted January 27, 2017 2:28pm by Varun Singh
    Varun Singh
    1,905 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

  • Daniel Meles
    Daniel Meles
    1,459 Points

    half my code won't run

    Posted January 6, 2017 8:55pm by Daniel Meles
    Daniel Meles
    1,459 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Exceptions

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.