๐Ÿค‘ 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
  • Benjamin Cha
    Benjamin Cha
    2,761 Points

    Adding MAX_BARS for Go Karts

    Posted March 5, 2024 12:50am by Benjamin Cha
    Benjamin Cha
    2,761 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    1 Answer

  • Fredrik Ljunggren
    Fredrik Ljunggren
    2,900 Points

    Need help

    Posted February 1, 2022 8:00pm by Fredrik Ljunggren
    Fredrik Ljunggren
    2,900 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    1 Answer

  • Matthew Maslow
    Matthew Maslow
    454 Points

    constant variable

    Posted November 22, 2021 3:58pm by Matthew Maslow
    Matthew Maslow
    454 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    1 Answer

  • Andrew Li
    Andrew Li
    4,251 Points

    I got a weird error message but cant figure out what I did wrong here.

    Posted May 22, 2020 11:15am by Andrew Li
    Andrew Li
    4,251 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    2 Answers

  • Josh Haefner
    Josh Haefner
    1,110 Points

    Java constant code challenge

    Posted August 22, 2019 2:55am by Josh Haefner
    Josh Haefner
    1,110 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    1 Answer

  • Joseph Saika
    Joseph Saika
    2,648 Points

    creating constants in a code

    Posted March 9, 2019 11:37am by Joseph Saika
    Joseph Saika
    2,648 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    4 Answers

  • Claus Jessing
    Claus Jessing
    1,674 Points

    What is the problem with line number 2?

    Posted October 2, 2018 8:42am by Claus Jessing
    Claus Jessing
    1,674 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    1 Answer

  • Ayhan Gรผler
    Ayhan Gรผler
    8,658 Points

    In my opinion the challenge says "accessable on class level", which means private or protected to me - not public?

    Posted June 27, 2018 1:18pm by Ayhan Gรผler
    Ayhan Gรผler
    8,658 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    2 Answers

  • Tomasz Baranczuk
    Tomasz Baranczuk
    7,055 Points

    What is wrong with my code? I did exactly the same as on the movie. public static final MAX_BARS = 12;

    Posted February 11, 2018 1:50am by Tomasz Baranczuk
    Tomasz Baranczuk
    7,055 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    2 Answers

  • Laurence Cimosz
    Laurence Cimosz
    8,993 Points

    "max bars

    Posted February 8, 2018 10:38pm by Laurence Cimosz
    Laurence Cimosz
    8,993 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    1 Answer

  • Andrei Punei
    Andrei Punei
    14,051 Points

    its not working

    Posted January 25, 2018 9:28am by Andrei Punei
    Andrei Punei
    14,051 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    2 Answers

  • Francis Lamy
    Francis Lamy
    8,218 Points

    Make sure that you've marked the MAX_BARS field with the static keyword. Which static keyword?

    Posted June 25, 2017 12:54pm by Francis Lamy
    Francis Lamy
    8,218 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    2 Answers

  • swm r
    swm r
    457 Points

    whats wrong here?

    Posted June 7, 2017 9:12pm by swm r
    swm r
    457 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    1 Answer

  • Schwartz Prince
    PLUS
    Schwartz Prince
    Courses Plus Student 2,132 Points

    Where I went wrong?

    Posted February 23, 2017 9:34pm by Schwartz Prince
    Schwartz Prince
    Courses Plus Student 2,132 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    1 Answer

  • Vamshi Raj Manchala
    Vamshi Raj Manchala
    848 Points

    Aren't the variable names in Java start with lower case letters?

    Posted January 27, 2017 1:48pm by Vamshi Raj Manchala
    Vamshi Raj Manchala
    848 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    1 Answer

  • Jiho Song
    Jiho Song
    16,469 Points

    HOW SHOULD I DO? (JAVA)

    Posted December 28, 2016 3:56am by Jiho Song
    Jiho Song
    16,469 Points
    • Java
    • Java Objects
    • Harnessing the Power of Objects
    • Add a Constant

    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.