This document defines a class called principal that implements the Runnable interface. The principal class takes an integer parameter called fila in its constructor. The run method multiplies all elements in the fila row of a 2D integer array called matriz by 10. The main method initializes the matriz with random integers, creates a thread pool, submits principal runnable objects to the pool for each row, times the execution, and prints the elapsed time.
This document defines a class called principal that implements the Runnable interface. The principal class takes an integer parameter called fila in its constructor. The run method multiplies all elements in the fila row of a 2D integer array called matriz by 10. The main method initializes the matriz with random integers, creates a thread pool, submits principal runnable objects to the pool for each row, times the execution, and prints the elapsed time.
This document defines a class called principal that implements the Runnable interface. The principal class takes an integer parameter called fila in its constructor. The run method multiplies all elements in the fila row of a 2D integer array called matriz by 10. The main method initializes the matriz with random integers, creates a thread pool, submits principal runnable objects to the pool for each row, times the execution, and prints the elapsed time.