Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Beginning Java and the fly likes constructor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "constructor" Watch "constructor" New topic


Catherine austin
Ranch Hand

Joined: Jul 20, 2011
Posts: 43
i can across question no-2 of chapter no-2 of K&B . I am not able to understand why does it fails.
Code is

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10767

In future, while posting code, please UseCodeTags. I have added them this time for you.
I am not able to understand why does it fails.

Can you explain what you mean by fails? What is the expected and actual behavior?

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: constructor
It's not a secret anymore!