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
Marina86 [1]
3 years ago
5

I am getting two expected errors on this code for the bottom two “public static void” lines. Can someone tell me how I can fix i

t? Thanks

Computers and Technology
1 answer:
AVprozaik [17]3 years ago
7 0

Answer:

Declare variable b in both lines

i.e. int b

Explanation:

In the given code, the parameters of both functions were not properly declared.

When listing the parameters, the data type must be clearly stated for all parameters (individually)

In the declaration of both functions, only variable a is declared as integer while b is undeclared.

So, the correction is to declare b as integer

You might be interested in
WRITE A JAVA PROGRAM TO PRINT THE PATTERN<br> 13579<br> 2468<br> 357<br> 46<br> 5
Inessa05 [86]

Answer:

import java.util.Scanner;

import java.lang.*;

class Main

{

  public static void main(String args[])

  {

     int n;

     //For capturing the value of n

     Scanner scanner = new Scanner(System.in);

     System.out.println("Enter the value of n:");

     //The entered value is stored in the var n

     n = scanner.nextInt();

     int k=1;

     printnum(n,k);  

  }

  public static void printnum(int n,int k)

  {

       if(n%2==0)

       {

       for(int i=k;i<=n-1;i=i+2)

            {

                System.out.print(i);

            }    

        System.out.println("");

       }

       else

        {

       for(int i=k;i<=n-1;i=i+2)

            {

                System.out.print(i);

            }    

        System.out.println("");

        }

      n--;

      if(n<=1)

      {

         System.exit(0);

      }

      else

      {

          printnum(n,k+1);

      }

   }

}

Explanation:

The program is self explanatory.

4 0
3 years ago
Before you ever buy your first stock or bond, it's important to understand what type of investor you are. This depends on a numb
Oksi-84 [34.3K]

Answer:

Moderate investor

Explanation:

The moderate investors are most popularly known as 'Balanced investors'. They accepts the risk to principal and they adopt the balanced approach. They mainly uses a mixture of bonds and stocks.

They values the reducing risks and then enhancing the returns equally. They accepts modest risks so as to ensure higher long term returns.

6 0
2 years ago
Simpson is trying to solve an equation related to converting a decimal number to its hexadecimal form. He decides to utilize the
Marina86 [1]
Divide 1210 by 16  and write reminder divide until value zero 

first step divide 1210 by 16 =  10 
then 75 divide by 16 =  11
4 

we can write 4 B A 
in hexadecimal 

4 0
3 years ago
If you were an architect planning on building a large scale Municipal complex what type of engineer would you identify as essent
Daniel [21]

Answer: civil engineer

Explanation:

Based on the information given, the type of engineer that would be identified as essential to the success of the project would be the civil engineer.

Civil engineers are the engineers that are in charge of the planning and overseeing building and infrastructure construction. They plan and monitor constructions involving bridges, road, houses, power plants etc.

3 0
3 years ago
Which function can you perform on a word processor but not on a typewriter?
AnnZ [28]
Deleting a character when you make a mistake and the print it without errors
4 0
3 years ago
Other questions:
  • Suppose a developer gets class XYZ files and documentation from a subcontractor. This class does not implement the Comparable in
    9·1 answer
  • Define a romanNumberToInt function that converts a RomanNumber value, which is a list of Roman digits, into an integer. Hints: -
    7·1 answer
  • In windows, a(n) ________ follows the file name and a period and indicates the file type.
    9·1 answer
  • Your wireless network has been breached and it seems as though the attacker has modified a portion of your data that is used wit
    12·1 answer
  • Which shortcut key combination will move the cursor to the beginning of the line?
    13·1 answer
  • [This is on Edhesive (coding and programming)]
    8·2 answers
  • What is the best stratiget to avoid paying intrest in your credit cared
    13·1 answer
  • Which of the following is a key difference between a Windows 7 restore point and one you set yourself?
    11·1 answer
  • _____ is rampant with bugs and shortcomings because most programmers do not know how or do not take the time to incorporate secu
    14·1 answer
  • An object completes one round of circle of radius 7m in 20 sec. Distance travelled after 10 sec is? ​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!