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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:17:55+00:00 2026-05-26T00:17:55+00:00

I want to know if a constructor in Java returns something. I know there

  • 0

I want to know if a constructor in Java returns something. I know there is no return value like ‘5’ or “Hello World.” But if we are assigning a variable to it:

People person = new People();

Then wouldn’t it logically make sense for the object or ID to be returned? Is the reference in memory where the object is stored assigned to people?

I am just thinking about this now because I am learning python, and want to connect the __new__ method to a constructor and then __init__ to the body of the constructor (i.e. the initial values). My professor keeps telling me __new__ doesn’t exist, so I am hoping to get an answer to make things clearer.

  • 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-26T00:17:56+00:00Added an answer on May 26, 2026 at 12:17 am

    In Java you only have primitives and references to objects as types for fields, parameters and local variables. A reference is a bit like an ID, except it can change as any moment without you needing to know when this has happened.

    A reference is closer to the concept of a pointer or object index. ie. it refers to a memory location.

    new is definitely a keyword in Java, so saying it doesn’t exist isn’t very meaningful. You could say it doesn’t have a one to one mapping in byte code, except byte code is itself run on a virtual machine and the machine actually run could be rather different anyway. i.e. there isn’t much point treating byte code as the way things “really” happen.

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

Sidebar

Related Questions

want to know why String behaves like value type while using ==. String s1
I want to do something like this public class Class1 { public Class1() {
I know there are quite a few questions concerning access violations, but I have
I want to know what's wrong with this. it gives me a constructor error
I would like to know how to use multiples clas in Java. I know
I want to know the in-memory representation of .NET constructs such as interface ,
Want to know what the stackoverflow community feels about the various free and non-free
I want to know what a virtual base class is and what it means.
I want to know what are the options to do some scripting jobs in
I want to know what exactly is the sequence of calls that occurs when

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.