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
Law Incorporation [45]
3 years ago
6

What is Recursion in Java?

Computers and Technology
1 answer:
wel3 years ago
6 0

Answer:

Recursion is a process of defining a method that calls itself repeatedly

Explanation:

Recursion is a basic programming technique of defining a method that calls itself repeatedly.

One practical example is using recursion to find the factorial of a number.

Consider the following java code below, it uses recursion to solve for the factorial of a number.

class Main {

   public static void main (String[] args) {

       System.out.println("Factorial of 3 is " + factorial(3));

       System.out.println("Factorial of 5 is " + factorial(5));

       System.out.println("Factorial of 7 is " + factorial(7));

   }

   //the factorial method uses recursion to find the factorial of the

   // parameter of the integer pass into it

   

   private static int factorial(int n) {

       int result;

       if ( n ==1) return 1;

       result = factorial(n-1) * n;

       return result;

   }

}

You might be interested in
/*this function represents
sergey [27]

anything

Explanation:

I know what to say this time

7 0
3 years ago
Read 2 more answers
a ____ is a horizontal or vertical bar that appears when the contents of an area may not be visible completely on the screen.
pav-90 [236]
The answer is a Scroll bar, the description fits perfectly because you need to move it to see more of the content you are viewing, and it wont be completely. when the item does appear completely on screen then the bar is relatively large and there is  no need for scrolling, however the opposite occurs during when you cannot see all of it.
5 0
3 years ago
What do the 100 or so atoms of the periodic table, in different combinations, make up
Nikolay [14]

Answer:

100 or so atoms of the periodic table, in different combinations, make up <u>Compounds</u>.

Explanation:

Atoms from different element in the periodic table combined together with the help of  bond and make a new product that is called compound.

<u>For example</u>

Hydrogen and oxygen are the elements of the periodic table. When one atom of oxygen and two atoms of hydrogen are combined together, a compound will be formed named as water (H20).

In another example, two atoms of oxygen and one atom of carbon combines toghther through chemical reaction and make compund named as Carbon dioxide (CO2).

6 0
3 years ago
You want to get an average of the number of siblings people in a group have. Which data format would be best for you to receive?
never [62]

The data format would be best for you to receive is Spreadsheet.

<h3>What is spreadsheet?</h3>

A spreadsheet is a computer program that allows you to compute, organize, analyze, and store data in tabular form. Spreadsheets were created as electronic counterparts to paper accounting spreadsheets. The software runs on data entered into table cells. Each cell can include numeric or text data, as well as the results of formulas that calculate and display a value dependent on the contents of other cells. One such electronic document may also be referred to as a spreadsheet.

Spreadsheet users can change any recorded value and see how it affects calculated numbers. Because of this, the spreadsheet is ideal for "what-if" analysis because many situations may be studied quickly without human recalculation. Modern spreadsheet software can include numerous interacting sheets and display data as text and numbers or as graphics.

To learn more about spreadsheet visit:

brainly.com/question/8284022

#SPJ4

6 0
1 year ago
What are the steps to add a bibliography to a document? 1. Create a using the proper steps. 2. Go to the tab on the ribbon. 3. I
olasank [31]

Answer:

The steps required to add a bibliography after adding the sources of the information contained in the document and marking the references made in the text, are;

1. Click to select insertion point of the bibliography

2. Select the Reference tab by clicking on the Reference tab in the ribbon

3. Within the Citations & Bibliography group, select Bibliography to open  a dropdown list of bibliography format

4. Select the applicable format

5. By selecting the desired bibliography format, the bibliography is inserted at the selected insertion point of the document

Explanation:

6 0
3 years ago
Other questions:
  • With respect to the general classes of computers, a ________ is the most expensive and most powerful kind of computer, which is
    7·1 answer
  • Of the three different types of résumé formats (chronological, functional, or combination), which format would you use to create
    11·2 answers
  • What kind of fragment is near the computer?
    14·1 answer
  • Why do most laptops have LCD rather than OLED displays, which are found on mobile devices?
    14·1 answer
  • PLEASE HELP!!!!! (Environmental Science Semester 1)
    7·2 answers
  • Cn someone help me plz
    11·1 answer
  • What is the code for forgot password on messenger​
    9·1 answer
  • The Ntds. dit file is a database that stores Active Directory data, including information about user objects, groups, and group
    7·1 answer
  • 15 _____ 3 = 0 Question 11 options: a) / b) % c) * d) //
    12·1 answer
  • On the new iOS version, can you save photos from ‘review confirmed photos’? If so, how? Thanks!
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!