Question: Need help writing this java program write program using arrays and scanner class array A (1,2,5,9,10) array B (1,2,3,4,8) compare A = B A B

Need help writing this java program
write program using arrays and scanner class array A (1,2,5,9,10)
array B (1,2,3,4,8)
compare A = B
A B
A U B
A subset B
I have this so far, please help
import java.util.Scanner;
public class ArrayAandB
{
public static void main (String [] args)
{
int [] arrayB = {8,15,25,30,45};
int [] arrayA = {8,15,25,30,45};
int size=10;
Scanner keyboard = new Scanner (System.in);
arrayA = new int [0];
arrayB = new int [0];
int i=size1-1;
int i=size2-1;
for (int i=0; i
for (int i=0; i
{
if (arrayA[i] == arrayB[i])
system.out.print ("number are equal");
}}}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!