Max, Bella, and Jack

  • 1
  • Locked
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".
You can't complete this task, because you're not signed in.
Comments (13)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
NightroWave
Level 3 , San Francisco, Norway
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.
Anonymous #10760185
Level 4 , United States of America
3 July 2021, 12:39
Remember to check the spacing in the coding
KIN SOCHEAT
Level 34 , Phnom Penh, Cambogia
28 April 2019, 02:35
Lesson list Creating objects
KIN SOCHEAT
Level 34 , Phnom Penh, Cambogia
28 April 2019, 02:34
/* The comment was deleted */
Roman
Level 41
2 May 2019, 06:41
Posting the solution in the comments is prohibited.
Divya Dammalapati
Level 2 , Hyderabad, India
1 December 2018, 11:44
Can someone explain about class,object,variable and reference clearly??
parth shah
Level 3 , Mumbai, India
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.
Roman
Level 41
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.
Ajibola Oluwatosin
Level 3 , Lagos, Nigeria
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";
Pina
Level 4 , PALERMO, ITALIA
28 January, 14:30
I have the same problem and I can't find a reference to this exercise in the Help section
Pina
Level 4 , PALERMO, ITALIA
28 January, 14:35
is there some bug? I asked for the solution..and the solution was same as my code....this is frustrating..
vikas gupta
Level 3 , Bareilly, India
14 October 2018, 06:26
/* The comment was deleted */
Roman
Level 41
16 October 2018, 05:51
Posting the solution in the comments is prohibited.