Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How to put the dynamic into the main fuction. The error show have to change the

ID: 3709210 • Letter: H

Question

How to put the dynamic into the main fuction. The error show have to change the dynamic to static. But the purpose is to have the difference between the static, dynamic and heap matrix thus how to correct this? Or it cannot be done by Java?

D*StaticMatrix.java 3 1 package assignment2; 3 import java.util.Random; 6 public class staticMatrix { 8 public static void main(String args[1) 7 staticMatrix(); staticDynamicMatrix ?10 12 13 public void staticDynamicMatrix() { 14 15 16 17 ?18 19 20 21 int d[][] = new int [100] [ 100]; int e[][] = new int [100] [100]; int f[][]= new int [100] [100]; Random rand = new Random(); int sum - 0; //Fill with random numbers for (int i-0; i

Explanation / Answer

Answer:

We can do it by doing this

public class StaticMatrix() {

public static void main(String args[]) {
staticMatrix();
StaticMatrix obj = new StaticMatrix();
obj.staticDynamicMatrix();
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote