🤑 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
  • 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.

    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.