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

  • Home
  • SEARCH
  • 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 586051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:04:01+00:00 2026-05-13T15:04:01+00:00

As my name suggests, I am a .NET developer but I have a growing

  • 0

As my name suggests, I am a .NET developer but I have a growing interest in Java, and I am interested in learning more about other languages as this helps me to learn more about programming generally.

Anyway, my question is this: Methods which don’t take parameters/work with state (which is just parameters in the method, correct me if I am wrong) are recommended to be made static. What is the relationship/link between static and parameterless methods? Not working with state means if you pass a Person object into the method, and you don’t edit that object’s state (Eg its properties) – this is my understanding.

I don’t mind any Java specific answers.

Thanks

  • 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-13T15:04:02+00:00Added an answer on May 13, 2026 at 3:04 pm

    There is no relationship between static and parameterless methods.

    A static method is one which does not access instance state in the receiving class (and therefore does not need to be associated with a particular instance). It can easily take parameters:

    public class Calculator
    {
      public static int Add(int a, int b) { return a + b; }  // does not need any Calculator state
    }
    

    A static method can access its parameters (and can therefore modify their state if they allow it):

    public class Officialdom
    {
      public static void Rename(Person person) { person.Name = "Bob"; }  // does not need any Officialdom state
    }
    

    Conversely, a parameterless method might well need to access receiver state, and therefore be an instance (non-static) method:

    public class Spline
    {
      private bool _isReticulated;
      public void Reticulate()
      {
        _isReticulated = true;  // does need Spline state
      }
    }
    

    (I’ve posted code samples in C# because this is language-independent; the same notions and distinctions apply in Java, possibly with a few keyword changes.)

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

Sidebar

Related Questions

I am a .NET developer (as my name suggests). We recently hired a lead
I have designed a small tutorial named Stacker, As the name suggests, The game
Name of the option tells something but what Visual Studio/compiler really do and what
Could somebody please name a few. I could given time, but this is for
We have a scenario where some .NET code is attempting to access the current
I'm teaching myself VB.Net. Here is a problem I have recently come across. Say
I have searched the web for resolution of this error, but everything I have
The function below, as its name suggests, registers/records the data from signup form into
Name the design considerations in deciding between use of a singleton versus a static
The name of a temporary table such as #t1 can be determined using select

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.