Skip to main content

NOTICE: On Friday Nov 6, Workspaces will be temporarily unavailable for maintenance.

🚀 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
  • Michel Spaniolo
    PLUS
    Michel Spaniolo
    Courses Plus Student 1,850 Points

    My code keeps saying darth vader instead of yoda.

    Posted May 22, 2022 12:40pm by Michel Spaniolo
    Michel Spaniolo
    Courses Plus Student 1,850 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    0 Answers

  • jh33
    jh33
    2,510 Points

    %n no longer functioning, instead /n. Want to fully understand.

    Posted December 28, 2020 6:04pm by jh33
    jh33
    2,510 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    0 Answers

  • Aung Maw
    Aung Maw
    643 Points

    getCharacterName or getcharacterName?

    Posted April 18, 2020 4:10am by Aung Maw
    Aung Maw
    643 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • Omar Jimenez
    Omar Jimenez
    1,446 Points

    Compiling error? But I have created a public method that returns my private variable.

    Posted June 11, 2019 1:22am by Omar Jimenez
    Omar Jimenez
    1,446 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • Brendan Passey
    Brendan Passey
    895 Points

    What is the difference here between a field and an object? You seem to be using them interchangeably.

    Posted January 2, 2019 4:18am by Brendan Passey
    Brendan Passey
    895 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • Daud Zeb
    Daud Zeb
    701 Points

    Method exposes value or expresses behaviour?

    Posted October 28, 2018 6:54pm by Daud Zeb
    Daud Zeb
    701 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • Carolina Estrada
    Carolina Estrada
    1,285 Points

    Just to clarify, the fields he is referring to is the instance variable?

    Posted August 31, 2018 4:21am by Carolina Estrada
    Carolina Estrada
    1,285 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • Bader Alami
    Bader Alami
    548 Points

    Why can't we just assign the getter to be equals to the original. public String getCharacterName = characterName;

    Posted October 23, 2017 3:53pm by Bader Alami
    Bader Alami
    548 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • Bader Alami
    Bader Alami
    548 Points

    why did we add a %n after %s?

    Posted October 22, 2017 5:32pm by Bader Alami
    Bader Alami
    548 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • kristoffer tølbøll
    kristoffer tølbøll
    1,337 Points

    Hashcode is printed

    Posted October 16, 2017 3:13pm by kristoffer tølbøll
    kristoffer tølbøll
    1,337 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • sizwengubane
    sizwengubane
    15,244 Points

    Why didn't we use "this->characterName"?

    Posted October 13, 2017 3:42pm by sizwengubane
    sizwengubane
    15,244 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • mohammed abdi abdulahi warsame
    mohammed abdi abdulahi warsame
    4,926 Points

    General question

    Posted September 14, 2017 2:08pm by mohammed abdi abdulahi warsame
    mohammed abdi abdulahi warsame
    4,926 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • John Anselmo
    PLUS
    John Anselmo
    Courses Plus Student 2,281 Points

    println vs printf?

    Posted August 2, 2017 1:04pm by John Anselmo
    John Anselmo
    Courses Plus Student 2,281 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • John Hay
    PLUS
    John Hay
    Courses Plus Student 3,478 Points

    getCharacterName returns the Character Name of the string object BUT...

    Posted July 24, 2017 9:41am by John Hay
    John Hay
    Courses Plus Student 3,478 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    3 Answers

  • Andrada Terenche
    Andrada Terenche
    1,103 Points

    When do we use parameters?

    Posted June 11, 2017 10:52am by Andrada Terenche
    Andrada Terenche
    1,103 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • Andrada Terenche
    Andrada Terenche
    1,103 Points

    Isn't public type predefined?

    Posted June 11, 2017 10:45am by Andrada Terenche
    Andrada Terenche
    1,103 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    2 Answers

  • toni chen
    toni chen
    3,865 Points

    getCharacterName is mutable

    Posted April 25, 2017 1:48am by toni chen
    toni chen
    3,865 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • vikas pal
    vikas pal
    11,563 Points

    Why we use get?

    Posted March 9, 2017 3:47am by vikas pal
    vikas pal
    11,563 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • Wannabe Engineer
    Wannabe Engineer
    9,186 Points

    Pez Dispenser error...

    Posted March 5, 2017 2:52pm by Wannabe Engineer
    Wannabe Engineer
    9,186 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    1 Answer

  • Ranvir Sahota
    Ranvir Sahota
    9,844 Points

    Purpose of declaring method reutrn type

    Posted February 22, 2017 5:17pm by Ranvir Sahota
    Ranvir Sahota
    9,844 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    3 Answers

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

    Return/Printf

    Posted January 23, 2017 7:51pm by João Ignácio Brito
    João Ignácio Brito
    1,201 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    2 Answers

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