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

AI can only take you so far. 🌟 Start with core skills in JavaScript, HTML, CSS, or Python. 🚀

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

New No-Code Track! 🚀start learning today!

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

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

AI can only take you so far. 🌟 Start with core skills in JavaScript, HTML, CSS, or 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
    • 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
  • 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
      • • Vibe Coding
    • Showing results for:
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play
    • Close
  • Christina Vieau
    Christina Vieau
    679 Points

    JShell not finding file, I am in the PezDispenser.java file but the console is giving an error message.

    Posted on Nov 30, 2023 by Christina Vieau
    Christina Vieau
    679 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    2 Answers

  • Mark Palmer
    Mark Palmer
    1,482 Points

    my console doesn't return the last line: "Dispenser is full" not sure why

    Posted on Oct 19, 2023 by Mark Palmer
    Mark Palmer
    1,482 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    0 Answers

  • kelly driskel
    kelly driskel
    1,544 Points

    Unable to access PezDispenser in Jshell jshell> /open PezDispenser doesn't open up what is seen in the video.

    Posted on Sep 16, 2021 by kelly driskel
    kelly driskel
    1,544 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    2 Answers

  • Lucas Easley
    Lucas Easley
    1,038 Points

    java 21 error

    Posted on Mar 16, 2020 by Lucas Easley
    Lucas Easley
    1,038 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    1 Answer

  • Jack McClelland
    Jack McClelland
    1,356 Points

    !isEmpty() was used to determine if dispenser was full - not being empty is not the same thing as being full though?

    Posted on Dec 28, 2018 by Jack McClelland
    Jack McClelland
    1,356 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    3 Answers

  • Jiawei Hu
    Jiawei Hu
    9,740 Points

    How do you exit jshell?

    Posted on Oct 5, 2018 by Jiawei Hu
    Jiawei Hu
    9,740 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    4 Answers

  • luis cantu
    luis cantu
    927 Points

    Cannot find symbol

    Posted on Jul 22, 2018 by luis cantu
    luis cantu
    927 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    1 Answer

  • Benjamin Gooch
    Benjamin Gooch
    20,367 Points

    I'm doing this differently... Is there any issues with the way I'm doing it that I'm not foreseeing?

    Posted on Jul 2, 2018 by Benjamin Gooch
    Benjamin Gooch
    20,367 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    1 Answer

  • David Anzano
    David Anzano
    1,468 Points

    jshell help

    Posted on Jun 28, 2018 by David Anzano
    David Anzano
    1,468 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    1 Answer

  • Henry B
    Henry B
    526 Points

    Printf and Println

    Posted on Apr 9, 2018 by Henry B
    Henry B
    526 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    1 Answer

  • Andrew Fitzpatrick
    Andrew Fitzpatrick
    3,013 Points

    Why is my code still saying it was yoda but craig switched it to Darth vader

    Posted on Mar 17, 2018 by Andrew Fitzpatrick
    Andrew Fitzpatrick
    3,013 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    1 Answer

  • aden ajayi
    aden ajayi
    552 Points

    how do I fix this error: reached end of file while parsing

    Posted on Mar 6, 2018 by aden ajayi
    aden ajayi
    552 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    1 Answer

  • aden ajayi
    aden ajayi
    552 Points

    Example.java:21: error: reached end of file while parsing

    Posted on Feb 22, 2018 by aden ajayi
    aden ajayi
    552 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    4 Answers

  • polo solo
    PLUS
    polo solo
    Courses Plus Student 437 Points

    Second "String" not working...Line 21 . It skips line 21. and jump to line 22. Works when change to "int". Why?

    Posted on Feb 10, 2018 by polo solo
    polo solo
    Courses Plus Student 437 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    1 Answer

  • Chris Rubio
    Chris Rubio
    1,643 Points

    On minute 4:25 (video : abstraction at play) how does craig clear his jshell ?

    Posted on Feb 3, 2018 by Chris Rubio
    Chris Rubio
    1,643 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    1 Answer

  • Andrei Musat
    Andrei Musat
    738 Points

    Error: cannot find symbol symbol: class PezDispenser PezDispenser pd = new PezDispenser("Yoda");

    Posted on Nov 8, 2017 by Andrei Musat
    Andrei Musat
    738 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    2 Answers

  • Rashmi Jha
    Rashmi Jha
    2,842 Points

    facing problem in jshell

    Posted on Sep 28, 2017 by Rashmi Jha
    Rashmi Jha
    2,842 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    3 Answers

  • Volodymyr Rozdolsky
    Volodymyr Rozdolsky
    3,732 Points

    pd.fill(); pd.isEmpty(); ==>true?

    Posted on Sep 9, 2017 by Volodymyr Rozdolsky
    Volodymyr Rozdolsky
    3,732 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    2 Answers

  • Pedro Araya
    Pedro Araya
    1,912 Points

    What if I errase the "return" on the isEmpty boolean?, does it change something?

    Posted on May 1, 2017 by Pedro Araya
    Pedro Araya
    1,912 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    1 Answer

  • Bruno Bock
    Bruno Bock
    681 Points

    It seems i can't close jshell for some reason...

    Posted on Feb 16, 2017 by Bruno Bock
    Bruno Bock
    681 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    3 Answers

  • marios armakolas
    marios armakolas
    2,147 Points

    Class names, 'PezDispenser', are only accepted if annotation processing is explicitly requested 1 error

    Posted on Feb 12, 2017 by marios armakolas
    marios armakolas
    2,147 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    2 Answers

  • marios armakolas
    marios armakolas
    2,147 Points

    error PezDispenser

    Posted on Feb 12, 2017 by marios armakolas
    marios armakolas
    2,147 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    1 Answer

  • Michael Hernandez
    Michael Hernandez
    1,365 Points

    Cannot find symbol error in jshell

    Posted on Feb 9, 2017 by Michael Hernandez
    Michael Hernandez
    1,365 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    2 Answers

  • João Ignácio Brito
    João Ignácio Brito
    1,201 Points

    Boolean method

    Posted on Jan 31, 2017 by João Ignácio Brito
    João Ignácio Brito
    1,201 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    2 Answers

  • Bryan Castillo
    Bryan Castillo
    2,484 Points

    Dont know where to Im missing a curly bracket

    Posted on Jan 30, 2017 by Bryan Castillo
    Bryan Castillo
    2,484 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    3 Answers

  • Michael Stedman
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Michael Stedman
    Full Stack JavaScript Techdegree Student 13,838 Points

    Jshell and REPL use requirement?

    Posted on Dec 19, 2016 by Michael Stedman
    .a{fill-rule:evenodd;}techdegree
    Michael Stedman
    Full Stack JavaScript Techdegree Student 13,838 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    2 Answers

  • Jonathan Grieve
    MOD
    Jonathan Grieve
    Treehouse Moderator 91,254 Points

    jShell isn't finding the PezDispenser object.

    Posted on Dec 13, 2016 by Jonathan Grieve
    Jonathan Grieve
    Treehouse Moderator 91,254 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Abstraction at Play

    6 Answers

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.