Question

1. How is Java’s behavior similar to pass-by-value in C++? How is it different? 2. How...

1. How is Java’s behavior similar to pass-by-value in C++? How is it different?

2. How is Java’s behavior similar to pass-by-reference in C++? How is it different?

Homework Answers

Answer #1

Question No 1:

Similar:

In both C++ and JAVA when passing by value we are only passing the datatype variable which we are seeing on front. In both we are actually making a copy of that datatype variable data

Difference:

   In JAVA the value you are passing can be a reference but in C++ it is always a value.

Question No 2:

Similar:

Both have reference combability thoroughly . Both Java and C++manipulate objects by reference.

Difference:

   In C++ pass by reference is completely different and in JAVA it is always pass by value.

We use & in C++ refereeing to a reference however in JAVA there's no such thing

IF YOU HAVE ANY QUERY PLEASE COMMENT DOWN BELOW

PLEASE GIVE A THUMBS UP

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1. How are liabilities and owners’ equity similar? How are they different? 2. You are a...
1. How are liabilities and owners’ equity similar? How are they different? 2. You are a shareholder of the Schuster Corporation and have just received the latest annual report of the company, containing financial statements for the previous fiscal year. You have no access to key managers of the company. Where will you look for additional information about the company to decide whether to increase or decrease your share holdings in Schuster? How will you evaluate the reliability of this...
How are the MSISDN and the MSRN different? How are they similar?
How are the MSISDN and the MSRN different? How are they similar?
In C++ 1) Write the function definition that has 1 pass by value integer parameter. The...
In C++ 1) Write the function definition that has 1 pass by value integer parameter. The function contains logic to return true if the parameter is even and false if it is not. 2 ) Write a main function that prompts the user for a value, calls the function that you created in step one with the value entered by the user, display "even" if the function return true and otherwise displays "odd"
How is groupthink similar to and different from conformity?
How is groupthink similar to and different from conformity?
How is the mechanical behavior of a single muscle fiber in tension different from the whole...
How is the mechanical behavior of a single muscle fiber in tension different from the whole muscle? What is the functional value?
How are medications and herbals similar and different? How are regulations for availability different? Because of...
How are medications and herbals similar and different? How are regulations for availability different? Because of the different regulations, what consequences could occur from the use of herbals? What is your opinion on taking herbals vs. medications?
How is production similar to consumer demand theory and how is it different?
How is production similar to consumer demand theory and how is it different?
Organization behavior 1. Discuss the impact of brainstorming on the possibility of groupthink? 2. Explain how...
Organization behavior 1. Discuss the impact of brainstorming on the possibility of groupthink? 2. Explain how managers can reduce misinterpretations when communicating with people from a different culture? Discuss the advantages and
How are the treatments for chronic bronchitis and emphysema similar and different?
How are the treatments for chronic bronchitis and emphysema similar and different?
How is the fixed payment loan similar to coupon bond? How is it different?
How is the fixed payment loan similar to coupon bond? How is it different?
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT