🤑 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

  • 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
    • Showing results for:
    • Java
    • Java Objects
    • Meet Objects
    • Methods
    • Close
  • Michel Spaniolo
    PLUS
    Michel Spaniolo
    Courses Plus Student 1,850 Points

    My code keeps saying darth vader instead of yoda.

    Posted on May 22, 2022 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 on Dec 28, 2020 by jh33
    jh33
    2,510 Points
    • Java
    • Java Objects
    • Meet Objects
    • Methods

    0 Answers

  • Aung Maw
    Aung Maw
    643 Points

    getCharacterName or getcharacterName?

    Posted on Apr 18, 2020 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 on Jun 11, 2019 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 on Jan 2, 2019 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 on Oct 28, 2018 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 on Aug 31, 2018 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 on Oct 23, 2017 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 on Oct 22, 2017 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 on Oct 16, 2017 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 on Oct 13, 2017 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 on Sep 14, 2017 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 on Aug 2, 2017 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 on Jul 24, 2017 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 on Jun 11, 2017 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 on Jun 11, 2017 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 on Apr 25, 2017 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 on Mar 9, 2017 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 on Mar 5, 2017 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 on Feb 22, 2017 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 on Jan 23, 2017 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.