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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:12:18+00:00 2026-06-13T09:12:18+00:00

I have an empty constructor for a Class. I want to delete the constructor,

  • 0

I have an empty constructor for a Class. I want to delete the constructor, but there are many places where I have things such as:

Klass my_klass = new Klass("");

I would like to delete the constructor and have Eclipse automatically refactor if it can. The result would look like:

Klass my_klass = new Klass();

Eclipse has all sorts of nice refactoring features. Does it have this?

  • 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-13T09:12:19+00:00Added an answer on June 13, 2026 at 9:12 am
    • Right click on the constructor you want to remove -> Refactor -> Change method signature.
    • Remove the paramaters you want (all of them in your case) and then your Eclipse will change all of your calls to this constructor automatically. If you already have a default constructor it will complain; just press Ok, it will give you a compilation error because you have two constructor with the same parameters,
    • Make a merge or delete the old one and you have the result that you want.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

say i have this class Framework.Asd.Human with a public empty constructor. and i want
I have a csv file which may have empty or blank rows. I want
I have an empty TextView set for my ListView . When there is no
I have files which have many empty cells which appear as NaNs when I
I read this question here: Is there a way to override the empty constructor
So, I have a class with a constructor like this: public FilterList(Set<Integer> labels) {
I have a class with several constructors and I want to call the main
Suppose I have a class like class Empty{ Empty(int a){ cout << a; }
If I have a collection object which is empty but needs to be filled
I have a singleton class for which I need a private member. I want

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.