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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:12:26+00:00 2026-05-24T22:12:26+00:00

in Java passing StringBuilders to methods seems it’s passing by Reference but in C#

  • 0

in Java passing StringBuilders to methods seems it’s passing by Reference but in C# it seems it’s passing by value, is it like this? do you think it may work only with ref keyword? what’re the differences overall?

  • 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-24T22:12:27+00:00Added an answer on May 24, 2026 at 10:12 pm

    A StringBuilder is an object, so whether you pass the reference to it by reference or by value, doesn’t matter at all. Java only has pass-by-value. If you pass the reference to it by reference, you are able to change the original reference from the method, that’t the only difference. The object you reference is always changed whether you send the reference to it by value or by reference.

    Why do you think there is a difference? Do you have any example code that seems to indicate there is a difference?

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

Sidebar

Related Questions

How to do this in Java - passing a collection of subtype to a
How does Java deal with passing reference data type arguments?? Can somebody give a
I would like to embed Clojure code into Java. This site was helpful in
I'm relatively new to java, and the passing by reference without pointers confuses me
I am developing a Swing/Java app but having difficulties passing data from the initiliaser
How to handle the variable passing using -D , like -Dcontext=web in Java code?
Since Java doesn't allow passing methods as parameters, what trick do you use to
I'm trying to learn Java, but I have a problem with passing an array
I'm writing a program that uses java.net.URLDecoder.decode(String value, String encoding) . Apparently, this method
All the examples I see are for Java SE applications by passing your JAR

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.