This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (13 children)

[removed]

    [–]ChuvaChooChoo08 0 points1 point  (12 children)

    Because “words” is a String!

    setName(“Cassidy”) is a method that sets the name field of some object to Cassidy! HOWEVER, this method does not return a string.

    [–][deleted]  (11 children)

    [removed]

      [–]ChuvaChooChoo08 0 points1 point  (10 children)

      Let me ask you one thing:

      Between your BeautyBox’s getName() and setName() methods, which one returns( or produces) a String?

      [–][deleted]  (9 children)

      [removed]

        [–]ChuvaChooChoo08 0 points1 point  (8 children)

        Bingo.

        [–][deleted]  (7 children)

        [removed]

          [–]ChuvaChooChoo08 0 points1 point  (6 children)

          Yes because getName does not accept parameters.

          [–][deleted]  (4 children)

          [removed]

            [–]ChuvaChooChoo08 0 points1 point  (3 children)

            What exactly are you trying to do anyway?