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
Levart [38]
3 years ago
10

Write a method that will receive 2 numbers as parameters and will return a string containing the pattern based on those two numb

ers. Take into consideration that the numbers may not be in the right order.
Note that the method will not print the pattern but return the string containing it instead. The main method (already coded) will be printing the string returned by the method.

Remember that you can declare an empty string variable and concatenate everything you want to it.

As an example, if the user inputs "2 5"

The output should be:

2
3 3
4 4 4
5 5 5 5
Computers and Technology
1 answer:
Kipish [7]3 years ago
5 0

Answer:

The purpose of the Java compiler is to translate source code into instructions  public static void main(String[] args)  Arity is the number of arguments passed to a constructor or method or the number ... and objects, which are the focus of object-based programs.  Remove the 2 from between the square brackets to make.

Explanation:

You might be interested in
Data is best described as
viktelen [127]

Answer:

The answer is B

Explanation:

TOOK THE TEST

5 0
3 years ago
Read 2 more answers
1.Write a Java program to solve the following problem using modularity. Write a method that rotates a one-dimensional array with
Westkost [7]

Answer:

Explanation:

The following code is written in Java and it asks the user for the size of the array. Then it randomly populates the array and prints it. Next, it rotates all the elements to the right by 1 and prints the new rotated array.

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Random;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Random r = new Random();

       Scanner in = new Scanner(System.in);

       System.out.println("Enter Size of the Array: ");

       int arraySize = in.nextInt();

       ArrayList<Integer> myList = new ArrayList<>();

       for (int x = 0; x < arraySize; x++) {

           myList.add(r.nextInt(15));

       }

       System.out.println("List Before Rotation : " + Arrays.toString(myList.toArray()));

       for (int i = 0; i < 1; i++) {

           int temp = myList.get(myList.size()-1);

           for (int j = myList.size()-1; j > 0; j--) {

               myList.set(j, myList.get(j - 1));

           }

           myList.set(0, temp);

       }

       System.out.println("List After Rotation :  " + Arrays.toString(myList.toArray()));

   }

}

6 0
2 years ago
Which is the best information to determine an athlete's abilities and needed areas of improvement?
katen-ka-za [31]

Answer:

4

Explanation:

7 0
2 years ago
Read 2 more answers
I neeeeed a girl that is looking for true love, trust me i will love her
nignag [31]

Answer:

sure!

Explanation:

4 0
2 years ago
Read 2 more answers
Pixel Data
pashok25 [27]

Answer:

-The correct width and height must be input into the pixelation widget to produce the image.

- The fact that only 32 bits were used to represent the image indicates relatively large sample squares were used. The digital image may vary from the analog image significantly.

Explanation:

8 0
3 years ago
Other questions:
  • Which finger types the highlighted keys on a number keypad? A. Third B. First C. Pinky D. Thumb
    7·2 answers
  • Error messages begin with the ____ symbol.
    6·2 answers
  • Technologies are having a negative impact on businesses.
    8·1 answer
  • A ________________ uses multiple systems to attack one or more victim systems or websites with the intent of denying service to
    7·1 answer
  • 60 POINTS!! WILL MARK BRAINLEST!!
    11·1 answer
  • (25 POINTS)Which statement best reflects the importance of following safety guidelines?
    8·2 answers
  • Which of the following is not a key component of a structure?
    12·1 answer
  • Attach 2 screen shots demonstrating an understanding of file management tools, such as keyboard shortcuts, copy, paste, delete,
    8·1 answer
  • NEED HELP ON TEST!!!
    5·1 answer
  • terms found in provider documentation (e.g., difficult, extensive, or unusual) would support adding modifier to a cpt code.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!