mention the following in terms of java...
1 : values passed in method.
2 : array is passed in method.
PLEASE HELP...URGENT...
BEST ANSWER.WILL MARK BRAINLIEST...
BRAINLY MEMBER HELP..☆
Answers
Holla Mate ur answer is....
1) Pass by value
2)Pass by reference
Hope it helps u ❤❤❤❤
Passing and Returning Objects in Java
Although Java is strictly pass by value, the precise effect differs between whether a primitive type or a reference type is passed.
When we pass a primitive type to a method, it is passed by value. But when we pass an object to a method, the situation changes dramatically, because objects are passed by what is effectively call-by-reference. Java does this interesting thing that’s sort of a hybrid between pass-by-value and pass-by-reference. Basically, a parameter cannot be changed by the function, but the function can ask the parameter to change itself via calling some method within it.
While creating a variable of a class type, we only create a reference to an object. Thus, when we pass this reference to a method, the parameter that receives it will refer to the same object as that referred to by the argument.
This effectively means that objects act as if they are passed to methods by use of call-by-reference.
Changes to the object inside the method do reflect in the object used as an argument..