• Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt in Code  RSS feed

 
Vibhor Chander
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q. I am not able to understand this code can anyone help me to understand?
 
Junilu Lacar
Sheriff
Posts: 11494
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

Put code tags around the code. Please read our UseCodeTags (← click that link) wiki page to learn more.

Also, since this could be homework and the requirement might be for you to explain what the code does, you'll have to do something else here.

How about you tell us what you understand each line of code is doing and we'll give you feedback based on that?
 
Campbell Ritchie
Marshal
Posts: 56587
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome again

That looks a very basic question so I have taken the liberty of moving you. I would have corrected the code tags, but you hadn't indented the code, so it wouldn&apost have made much difference. Not indenting code consistently is a serious mistake, because you will find your own code harder to read and you will have difficulty finding any errors.
If you have been given the code, there are serious design errors in it, including the public field in the Feline class.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!