AMYGUMMMMMY AMYGUMMMMMY
  • 10-12-2020
  • Computers and Technology
contestada

How should I do it Please code for Java

How should I do it Please code for Java class=

Respuesta :

tonb
tonb tonb
  • 10-12-2020

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.

Answer Link

Otras preguntas

what is the percent composition of hydrogen in NH4HCO3?
what is 14/5 as a mixed number ?
which 4 european countries had huge empires around the world
Epidemics like smallpox often spread rapidly and wiped out entire native tribes. Why weren’t these diseases as fatal for the Spanish? A) The Spanish had vaccina
How did Manifest Destiny influence sectionalism?
some people have suggested that health care problems could be overcome by the creation of a?
What was the basic social, religious, and political unit in early Japanese society?
Has there ever been a time when you felt like you were alone when there were people all around you? if so tell me a little about it. its for my school assignm
Help me with this. Would he 19 in stem be 19 or 190
(3 pt) Which sentence does not contain any punctuation errors? A. He recently wore his new shirt which was a present from his aunt to the reunion. B. He recentl