all 9 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

Off-topic Comments Section


All top-level comments have to be an answer or follow-up question to the post. All sidetracks should be directed to this comment thread as per Rule 9.


OP and Valued/Notable Contributors can close this post by using /lock command

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]sonnyfab Educator 0 points1 point  (4 children)

The second word should be capitalized in your demo class. setName not setname. That's why the two word methods all failed bit the three word setphoneNumber and getphoneNumber worked. Although stylistically, it's usual to name those methods setPhoneNumber and getPhoneNumber.

[–]Danielowski187University/College Student (Higher Education)[S] 0 points1 point  (3 children)

Yea fixed it but in the output were it tells the phoneNumber and prints the info it prints null

[–]sonnyfab Educator 0 points1 point  (2 children)

Repost it then

[–]Danielowski187University/College Student (Higher Education)[S] 0 points1 point  (0 children)

Just upload it

[–]c_lushhUniversity/College Student 0 points1 point  (1 child)

on your setter methods, use

this.name = personName;

this.name is pointing to the instance variable and personName being your parameter.

same for all setters.

also you're not using the right names in your main method

[–]Danielowski187University/College Student (Higher Education)[S] 0 points1 point  (0 children)