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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:10:11+00:00 2026-06-05T04:10:11+00:00

Suppose your class has 2 methods: contains() and containsSame() The distinction between them is

  • 0

Suppose your class has 2 methods:

contains() and
containsSame()

The distinction between them is subtle and you’d like to mention it as part of Javadoc

In Javadoc, how can you reference a method in the same class, by name?

  • 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-05T04:10:14+00:00Added an answer on June 5, 2026 at 4:10 am

    Use the @link inline tag, and refer to the method with a leading #.

    /**
     * ...
     * This method is similar to {@link #contains()}, with the following differences:
     * ...
     */
    public boolean containsSame();
    
    
    /**
     * This method does ...
     */
    public boolean contains();
    

    This example only works if there is actually a contains() method which has no arguments (which, actually, seems to be not that useful). If you have only a contains method with arguments, then either write the argument types in the parentheses:

    /**
     * ...
     * This method is similar to {@link #contains(Element)}, with the following differences:
     * ...
     */
    public boolean containsSame(Element e);
    
    /**
     * This method does ...
     */
    public boolean contains(Element e);
    

    Or you can omit the parentheses completely:

    /**
     * ...
     * This method is similar to {@link #contains}, with the following differences:
     * ...
     */
    public boolean containsSame(Element e);
    
    /**
     * This method does ...
     */
    public boolean contains(Element e);
    

    If you have several methods named contains (with different parameter lists), this version can’t decide which one to use (the link will jump to any of them, hopefully they are all together and do similar things).

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

Sidebar

Related Questions

Suppose your JSON data has a key like @id ... with a non-alphanum character...
Suppose to have a code like this: <div class=notSelected> <label>Name <input type=text name=name id=name
Suppose I want to have a class like Java Date . Its only data
suppose you update your code to revision 10 which is broken. You want to
Suppose I have: public class foobar { public int lorem; public int ipsum; }
Suppose I have string Name and Image Photo as properties of a class in
I have 3 entities like this: sorry that this image has a problem that
I have a small problem and I would like to get your opinion. I'm
I have a dilemma. Suppose I have a template class: template <typename ValueT> class
Suppose I have a class with 3 constructors, a default (no argument) constructor, a

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.