Briefly
describe how parameter passing by value and by reference are accomplished in
memory. Write statement 1 to call Method A below. Write statement 2 to call
Method B. Which method uses pass by value? Which method uses pass by reference?
static void
Main()
{
int accountTotal = 10000;
//statement 1
//statement 2
}
//method A
public static void getAccountTotal(ref
int accountTotal)
{
accountTotal = accountTotal + 300;
}
//method B
public static int getAccountTotal(int
accountTotal)
{
return (accountTotal + 300);
}
================
*Instant Download
Briefly describe how parameter passing by value and by reference are accomplished in memory
- Technology: WriteUps-papers-Essays-Designs
- Code: SHC_WriteUp_10004
-
$9.99
Tags: parameter passing, by value, by reference, memory, Writeup, java