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
Nataliya [291]
3 years ago
15

How should I do it Please code for Java

Computers and Technology
1 answer:
andrew-mc [135]3 years ago
3 0

Answer:

class Main {  

 public static void printPattern( int count, int... arr) {

     for (int i : arr) {

       for(int j=0; j<count; j++)

           System.out.printf("%d ", i);

       System.out.println();

     }

     System.out.println("------------------");

 }

 public static void main(String args[]) {

   printPattern(4, 1,2,4);

   printPattern(4, 2,3,4);

   printPattern(5, 5,4,3);

 }

}

Explanation:

Above is a compact implementation.

You might be interested in
Public static String doSomething(String s) { final String BLANK = " "; //BLANK contains a single space String str = ""; //empty
storchak [24]

Answer:

D. It returns a String that is equivalent to s with all its blanks removed

Explanation:

3 0
3 years ago
• What is the difference between primary storage, secondary storage, and off-line storage
sergiy2304 [10]


Primary storage refers to your RAM it is internal storage.

Secondary storage is any storage that is not the primary storage that permanently stores data. Examples are hard drive, tape disk drive, floppy disk drive  and compact disk drive. 

Off-line storage refers to any device that stores data that is not permanently attached to the computer. Example flash drives, The data remains on the storage device and can be connected to a different computer. 

3 0
3 years ago
Eric would like to have a color textbook that makes it look as if the character in an image is speaking. Which object should he
timurjin [86]

Explanation:

the answer is call out safe or picture

3 0
3 years ago
Technological advances have made cyberbullying
Tamiku [17]

Answer:

ok

Explanation:

6 0
3 years ago
The objects that you place on master pages are called _____.
Studentka2010 [4]
The answer to this is A.
3 0
3 years ago
Other questions:
  • Write a program that takes two ints as input from the keyboard, representing the number of hits and the number of at bats for a
    10·1 answer
  • It is either snoming or below freezing
    10·1 answer
  • If data from a DOS system is electronically sent to an EHR or other Windows-based system via an interface to populate an indexed
    7·1 answer
  • Write a program that inputs a time from the console. The time should be in the format "HH:MM AM" or "HH:MM PM". Hours may be one
    6·1 answer
  • Create a datafile called superheroes.dat using any text-based editor, and enter at least three records storing superheroes’ name
    9·1 answer
  • Write a Java program to count the characters in each word in a given sentence?Examples:Input : geeks for geeksOutput :geeks-&gt;
    10·1 answer
  • I have lost the watch (that,which) you gave me​
    12·1 answer
  • 3. When you right-click a linked spreadsheet object, what commands do you choose to activate the Excel features?
    7·2 answers
  • Write a program that reads in 10 numbers and displays the number of distinct numbers and the distinct numbers in their input ord
    14·1 answer
  • The process of sending a result back to another part of the program is
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!