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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:04:39+00:00 2026-05-24T19:04:39+00:00

In languages like Java and c#, when you declare an interface the parameters on

  • 0

In languages like Java and c#, when you declare an interface the parameters on the functions have variable names. Could you make it more minimal and have the syntax work like this:

void Print( String );

Instead of the current

void Print( String str );

Other then readability, where the variables help define what the parameters are supposed to be, are there reasons require variable names on interfaces?

Readability example:

void doSomething( long, long );

versus

void doSomething( long id, long timeLimitMilli );
  • 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-24T19:04:40+00:00Added an answer on May 24, 2026 at 7:04 pm

    Based on my test I would say the answer is “not a bit”:

    ./a/Foo.java

    public interface Foo {
        void run(int x);
    }
    

    ./b/Foo.java

    public interface Foo {
        void run(int y);
    }
    

    Then

    $ sha1sum ./a/Foo.class
    7ae75c91f553e09e5a06d5630134e63d650d734e  ./a/Foo.class
    $ sha1sum ./b/Foo.class
    7ae75c91f553e09e5a06d5630134e63d650d734e  ./b/Foo.class
    

    ie Java cares so little about the parameter names they are discarded entirely on compiling. They are, for all intents and purposes, comments.

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

Sidebar

Related Questions

Is the nesting of functions possible in the object oriented languages like C#, Java,
In languages like C++ and Java, it is possible to declare an array of
Some static languages like Java seem to have very special rules for variables defined
In languages like Java and C#, strings are immutable and it can be computationally
I moved one years ago from classic OO languages such like Java to JavaScript.
When I read about the performance of JITted languages like C# or Java, authors
Possible Duplicate: Should C++ eliminate header files? In languages like C# and Java there
Can C++ slicing apply to other languages too, like Java/C#?
JSON stands for JavaScript Object Notation. But how come languages like php, java, c
Languages like C and even C# (which technically doesn't have a preprocessor) allow you

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.