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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:48:26+00:00 2026-05-22T01:48:26+00:00

Often the number of arguments passed to a function can be large. Consider the

  • 0

Often the number of arguments passed to a function can be large. Consider the following case:

calculate(dataManager.getLastUpdate().getNumberOfChildren(),
          dataManager.getLastUpdate().getNumberOfParents(),
          dataManager.getLastUpdate().getNumberOfGrandChildren(),
          long milliseconds,
          int somethingelse)

Is there a guideline in Java that offers a way to align the arguments? Fitting all arguments in a line would not look pretty.

  • 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-22T01:48:26+00:00Added an answer on May 22, 2026 at 1:48 am

    According to Sun’s Java coding conventions, section "Wrapping Lines":

    When an expression will not fit on a single line, break it according to these general principles:

    • Break after a comma.
    • Break before an operator.
    • Prefer higher-level breaks to lower-level breaks.
    • Align the new line with the beginning of the expression at the same level on the previous line.
    • If the above rules lead to confusing code or to code that’s squished up against the right margin, just indent 8 spaces instead.

    The document also includes some examples for method calls:

    function(longExpression1, longExpression2, longExpression3,
             longExpression4, longExpression5);
    
    var = function1(longExpression1,
                    function2(longExpression2,
                              longExpression3));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following function counts how often I can divide one number by another: divs
In Ruby I have often written a number of small classes, and had a
Quite often one has to encode an big (e.g. 128 or 160 bits) number
Often, when restarting Django runserver, if I use the same port number, I get
Occasionally I come across methods with an uncomfortable number of parameters. More often than
We're currently building an application that executes a number of external tools. We often
I'm trying to write a function to do some often repeated analysis, and one
This often returns NAN (Not A Number) depending on input: #define PI 3.1415f GLfloat
I often use java.lang.Integer as primary key. Here you can see some piece of
Often a class has to be configured using a number of boolean options. What

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.