If you open this task, you will find an existing Dog class. We need to create several dogs. We've already thought up their stories: we know how they look, what names they respond to, etc. But in this task, we are interested in the following: create three Dog objects, and then name them "Max", "Bella", and "Jack".
Max, Bella, and Jack
- 1
Locked
Comments (13)
- Popular
- New
- Old
You must be signed in to leave a comment
NightroWave
15 March, 17:51
Este ejercicio va mucho mejor que el que encontramos anteriormente de ".husband" / "wife" / Man / Woman. Creo que si el curso comenzase con estas explicaciones y ejercicios sobre los nombres de perros, y luego se introdujese el de crear un objeto Man/Woman, iría mucho mejor para los nuevos.
0
Anonymous #10760185
3 July 2021, 12:39
Remember to check the spacing in the coding
0
KIN SOCHEAT
28 April 2019, 02:35
Lesson list
Creating objects
0
KIN SOCHEAT
28 April 2019, 02:34
/* The comment was deleted */
+1
Roman
2 May 2019, 06:41
Posting the solution in the comments is prohibited.
0
Divya Dammalapati
1 December 2018, 11:44
Can someone explain about class,object,variable and reference clearly??
+1
parth shah
15 November 2018, 14:29
My Code ::
public class Solution {
public static void main(String[] args) {
Dog Max = new Dog();
Dog Bella = new Dog();
Dog Jack = new Dog();
//write your code here
}
public static class Dog {
public String name;
}
}
Question is ::
Why condition ''Each Dog object must be assigned a name'' is not getting fulfilled here ? I think i m missing something.
+1
Roman
16 November 2018, 08:00
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at codegym.cc/help.
+1
Ajibola Oluwatosin
28 February 2019, 09:40
The instance variable name is in the class Dog. You are meant to assign this variable the names of the dog.
Dog object = new Dog();
object.name = "name_of_dog";
+1
Pina
28 January, 14:30
I have the same problem and I can't find a reference to this exercise in the Help section
0
Pina
28 January, 14:35
is there some bug?
I asked for the solution..and the solution was same as my code....this is frustrating..
0
vikas gupta
14 October 2018, 06:26
/* The comment was deleted */
0
Roman
16 October 2018, 05:51
Posting the solution in the comments is prohibited.
+3