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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:09:30+00:00 2026-06-02T03:09:30+00:00

I am tasked with converting some Python code to Java. I have some experience

  • 0

I am tasked with converting some Python code to Java. I have some experience with Python, but am unfamiliar with some of its features.

I see an __init__ method which I understand is essentially a constructor.

I expect to see arguments like this:

def __init__(self,derp1, derp2, derp3):

But in one part of the code, I see:

def __init__(self,derp1=0, derp2=0, derp3=0):

Now, to me, it looks like this is some sort of conditional constructor, used specifically when (self,0,0,0) has been passed. This shouldn’t be the case, because there is no alternative constructor.

It also shouldn’t be an inline assignment, as that just doesn’t make sense.

I’ve tried Googling to figure out what this means, but I’m not having much luck.

I appreciate any help you can offer.

  • 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-02T03:09:32+00:00Added an answer on June 2, 2026 at 3:09 am

    They’re Default Argument Values.

    I think Java doesn’t support it.

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

Sidebar

Related Questions

I have a bit of code that I have been tasked with converting to
I'm tasked with converting an existing Java/C++ mixed web-application to pure Java, but I'm
I have been tasked with converting several php classes into java classes, which is
So I've been tasked with converting some T-SQL code to C code. Whoever wrote
I have been tasked with porting a large Java codebase to the Android platform.
I have been tasked with refactoring some components that used xmlbeans to now make
I've been tasked with maintaining a Visual Studio 2005 solution but I only have
I've been tasked with converting some text log files from a test reporting tool
I have been tasked with converting an old VB6 program to to C#. One
I have been tasked with creating a 2d game (In JAVA) for Computer Science

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.