Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8640111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:11:58+00:00 2026-06-12T11:11:58+00:00

I have a question on page 128 of Bruce Eckel’s Thinking In Java 4th

  • 0

I have a question on page 128 of Bruce Eckel’s Thinking In Java 4th Edition, the second paragraph, the last sentence it asks:

what would happen if an overloaded constructor were defined that did not initialize w3 and there wasn’t a “default” initialization for w3 in its definition?

I found this statement is confusing to understand, could experts or readers of this book help me a little? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T11:12:00+00:00Added an answer on June 12, 2026 at 11:12 am

    Window w3 = new Window(3);

    It is just guarding if someone does not initialize w3 properly in the overloaded constructor. Such field instantiation is automatically put at the beginning of each constructor. So even the overloaded one will receive the w3 initialization.

    If you declare only Window w3, then w3 will remain null when the overloaded constructor is executed.

    Here is the code from the book:

    import static net.mindview.util.Print.*;
        // When the constructor is called to create a
        // Window object, you’ll see a message:
        class Window {
            Window(int marker) 
            { 
                print("Window(" + marker + ")"); 
            } 
        }
    
       class House { 
           Window w1 = new Window(1); 
           // Before constructor 
           House() {
               // Show that we’re in the constructor:
               print("House()");
               w3 = new Window(33); // Reinitialize w3
           }
            Window w2 = new Window(2); 
            // After constructor void f() { print("f()"); } 
            Window w3 = new Window(3); 
        // At end 
       }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have seen stackoverflow ask question page they disable button until my postback event
Dear all, I have a question about Facebook Page: ( NOT user profile page,
I have few question in this regard When you create an internet page, does
i have a question, i have a index.php page that is the intro of
Possible Duplicate: Detect Facebook page fan on the website I have a question to
I have a quick question about the layout of the page on a custom
I have a rails app running on port 3000. The page in question has
Okay this question is very simple: I have a facebook page, and a website.
I have to create a web page that for the purposes of this question
I have a design/best practice question relating to MVC3. I have a front page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.