My code hasn't qualified for Condition #5, but still compiled and ran successfully, completing the task. Please execute to see the output of the print lines.
Unable to attach the code snippet, since the task has already been solved.
My code hasn't qualified for Condition #5, but still compiled and ran successfully, completing the task.
Under discussion
Comments (7)
- Popular
- New
- Old
You must be signed in to leave a comment
gery
14 September 2018, 06:07
5. The Cat class's setName method must set the value of the global private String variable
global private string variable is private String fullName;
since its private, it can only be access in setName method via this.fullname
now
write after String fullname = firstname + " "+ lastname;
this.fullname = fullname;
now the above lines means: set the global private variable to the method variable value.
hope it solves.
+4
Mogili Venkatesh
12 September 2018, 10:30
Assign String to the fullName variable and in next line write this.fullName=firstname+lastname.
Bcz, we have to modify fullName declared in the global static String. That can be override only if we give this.variable name.
-2
Loay Alkhalaf
30 October 2018, 04:48
this is the correct format this.fullName = fullName;
+1
Roman
6 September 2018, 06:02
Copy your code and paste it here as a text.
0
WonderWoman
10 September 2018, 06:21
Now the code is missing though the task lists as Completed!
0
hidden #10214656
14 September 2018, 06:56
0
Roman
17 September 2018, 05:26
You have a typo in your output string.
0