Java Assignment 3
Java Assignment 3
Java Assignment 3
}
System.out.println();
}
}
}
OUTPUT:
1 3 4
2 4 3
3 4 5
1 2 3
3 4 4
4 3 5
2. Implement multiplication of two Matrix
for(int i=0;i<3;i++)
{
for(int j=0;j<3;j++)
{
c[i][j]=0;
for(int k=0;k<3;k++)
{
c[i][j]+=a[i][k]*b[k][j];
}//end of k loop
System.out.println();
}
}
}
OUTPUT:
666
12 12 12
18 18 18
3. Implement a program to generate random password based on customer name,
age and id for banking applications.
import java.util.*;
//Here we are using random() method of util to generate password
for(int i=0;i<len;i++)
{
password[i] =
values.charAt(rndm_method.nextInt(values.length()));
}
return password;
}
}
OUTPUT: