I want to find the product of two matrix using a function without using for loop?
Help is really appreciated.

Why don't you want to use a for-loop? That would be the easiest way. Any for-loop can be converted to a while or do-while loop, and vice versa.

You're looking at using nested loops, whatever type of loops those are. If you're multiplying an m x n matrix by an n x p matrix, you'll end up with an m x p matrix. The (a, b) element of the resulting n x p matrix will be calculated by multiplying the ath row of the m x n matrix by the bth column of the n x p matrix. You get that by setting up a sum variable, initializing it to 0, setting up a loop, going through it n times, each time multiplying two numbers and adding it to the sum. That's the innermost loop.

The outermost loop will be traversed m times (number of rows in the first matrix). The middle loop will be traversed p times (number of columns in the second matrix).

So you have a loop within a loop within a loop. I'd make them all for loops, but as mentioned, any for-loop can be turned into a while or do-while loop.

import java.util.Scanner;
public class LuckySevens {
private int diceLength;
private int rolls;
private int sides;
private int numRolls = 0;
public static void main (String [] args) {
Scanner reader ...

I am working creating a fully encapsulated, homogeneous singly linked data structure. The Listing class and SinglyLinkedList class that are part of the whole application compile fine, but the problem ...