Skip to main content

Notice: Workspaces are undergoing maintenance and are temporarily unavailable.

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

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

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

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • 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
      • • Vibe Coding
  • 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.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

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

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord