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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:36:13+00:00 2026-05-11T22:36:13+00:00

Similar to How to change "Generate Method Stub" to throw NotImplementedException in VS? ,

  • 0

Similar to How to change "Generate Method Stub" to throw NotImplementedException in VS?, but for Eclipse instead of Visual Studio

Both NetBeans and Eclipse have a function that, if you declare a Java class to implement an interface but omit one or more methods, will automatically generate a stub method for you.

The difference is that the Eclipse version will do nothing, and return zero or null, e.g.

public String munge(String foo) {
    // TODO Auto-generated method stub
    return null;
}

The NetBeans version will throw an exception instead:

public String munge(String foo) {
    throw new UnsupportedOperationException("Not supported yet.");
}

which I prefer.

Is it possible to configure Eclipse to do 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-05-11T22:36:14+00:00Added an answer on May 11, 2026 at 10:36 pm

    Go to Windows -> Preferences -> Java -> Code Style -> Code Templates. On the right you’ll see “Comments” and “Code”. Expand “Code” and the one you’re looking for is “Method Body”. Click “Edit…” and put whatever you want in there.

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

Sidebar

Related Questions

Im trying to change images on click similar to what SO does with the
I need to change a lot of textboxes to NumericUpDowns and other similar changes
There are several similar Oracle technologies - Oracle Streams, Oracle Change Data Capture and
using RewriteCond or similar mechanism on apache, can i change how fast content is
They seems pretty similar.What is the different? If I choose wrong, can I change
I'm trying to create a page that allows a user to change the "look
First off, I know I can copy "this" on instantiation, but that doesn't work
A similar question was asked and answered about a year ago, but was either
can i use xsl or another thing similar to change this format <rr n=Address>
I have 3 similar functions, that only change based on numeric type: <Extension()> _

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.