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 7054371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:37:06+00:00 2026-05-28T03:37:06+00:00

In the following scenario public class Parent1 { } public class Child1 extends Parent1

  • 0

In the following scenario

public class Parent1 { }

public class Child1 extends Parent1 {}

Child1 c1 = new Child1();
Child1 c2 = new Child1();

objects c1,c2 also creates two objects of Parent1 class?

and can you guys please tell me how can i check in real time ?

Thanks in advance

  • 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-05-28T03:37:07+00:00Added an answer on May 28, 2026 at 3:37 am

    When you create child objects, memory will be allocated for the members of parent object as well. You can check that parent object is being created by having a System.out.println in the parent class’s constructor.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following scenario: public class A { } public class B extends
Using NHibernate, how can I map the following scenario: public class User { public
If i have the following scenario: public class Foo extends Baz{ private String banana
In the following scenario: class Person{ public int ID; } class Student extends Person{
Have a look at following scenario: public class ParentClass { private Integer testVar =
Take the following scenario: Public Class Store Public Overridable Property Areas As List(Of Area)
I have the following scenario :- template <typename T> class Base { public: virtual
I'm having the following scenario: class A { public static $arr=array(1,2); } class B
Original Question Consider the following scenario: public abstract class Foo { public string Name
I am using NHibernate with fluent mapping. I have the following scenario: public class

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.