1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
DerKrebs [107]
3 years ago
15

When an object reference is passed as a parameter to a method, modifying the members of that object from inside the method will

result in a change to that object as seen from the client.
a. True
b. False
Computers and Technology
1 answer:
bogdanovich [222]3 years ago
7 0

Answer:

A) True

Explanation:

Objects are known as reference types, meaning that they are always accessed by references, not copied. When a method is called, passing an object to it, Java passes a reference of that object to the method and when that reference is modified, the changes can be seen in the object itself. Therefore a mutable object can be mutated anywhere- either from where it is created or by a method it is passed to. Hence the need to always use privacy modifier keywords such as public, private or protected, to determine the exposure of class properties and methods.

You might be interested in
. Write a recursive function names factorial to compute the factorial of the parameter. Also write the main function, where you
r-ruslan [8.4K]

Answer:

Following are the code in c language

#include <stdio.h> // header file

long int factorial(int n); // declaration of factorial function

int main() // main function

{

   int n; // variable declaration

   printf("Enter a positive integer: ");

   scanf("%d", &n); // input number

   while(n<0) // checking the condition if number is negative

{

    printf("please enter a positive number:");

    scanf("%d", &n);

}

   printf("Factorial of %d = %ld", n, factorial(n)); // calling  factorial function

   return 0;

}

long int factorial(int n1) // recursive definition of factorial

{

   if (n1 >= 1)

       return n1*factorial(n1-1);

   else

       return 1;

}

Explanation:

In this program, it ask for a positive number input. if the value enter by user is negative then it again ask for positive input i.e positive number. Then it calls the recursive function of factorial. the recursive function factorial calculate the factorial recursively. suppose user input 4 then it goes to the if  part of program i.e return n*factorial(n-1); that means return 4*factorial(3) again recursive function call itself .this process repeated until it meets the base condition.  when a base condition meets, it return factorial of the given number.

output

Enter a positive integer: 5

factorial of 5=120

Enter a positive integer: -8

please enter a positive number:4

factorial of 4=24

4 0
3 years ago
Mateo could not find the undo command or shortcut. He should _____.
mr Goodwill [35]
Mateo should click on help.
5 0
3 years ago
Read 2 more answers
Bullet points on a slide should be limited to _____.<br><br> A. 2<br> B. 4<br> C. 8<br> D. 10
Brums [2.3K]
<span>Bullet points on a slide should be limited to _____.</span>

B. 4 !
6 0
3 years ago
The stack ADT may be implemented with
Masteriza [31]

Answer: (c)All others answers

Explanation: Stack ADT is the group of the objects that are present  to work according to the last in first out strategy for the abstract data types. It works on the insertions and deletion of the elements that is referred as the push and pop action.

The ADT stacks can works with arrays, links list as well as vectors for the operation .Therefore, the correct option is option(c)

4 0
3 years ago
PLEASE HELP ME!!!!
White raven [17]
The answers are D and A
5 0
3 years ago
Read 2 more answers
Other questions:
  • Match each of the following terms to its function:_________
    13·1 answer
  • Does anyone know the answer to this question
    9·1 answer
  • you'll be organizing the various databases in your organization, and have recommended hiring a/an?A. internet specialist B. comp
    6·2 answers
  • Write a function called has_duplicates that takes a string parameter and returns True if the string has any repeated characters.
    15·1 answer
  • Write a program which will enter information relating to a speeding violation and then compute the amount of the speeding ticket
    14·1 answer
  • What is text formatting/
    5·1 answer
  • What is the easiest way to defeat ganon in BOTW?
    11·2 answers
  • A user calls the help desk to report that a mobile device exhibits very slow performance. What could cause this problem
    9·1 answer
  • Network administrators use _____ technology when they need antivirus updates to be automatically downloaded on employees' workst
    15·1 answer
  • Html specifications that are not included when newer specifications are released or are not included in the xhtml specification
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!