I've been working on this from quite some time now and am getting frustrated with the errors I am getting I hope someone out there can help me fix at least some of these or put me in the right direction. My errors start with **//. I tried to look up my questions already and could find nothing that truly helped me but I know i'll find someone on here who can this is why i'm posting.
import java.util.*;
import java.lang.Math;
public class TestBoxBiggest
{
public static void main(String[]args)
{
//10 random Integers
Random n=new Random();
Integer[] x= new Integer(10);**//error:cannot convert from java.lang.Integer to java.lang.Integer[]**
for (int i=0;i<10;i++)
{
x[i]=n.nextInt(100);
System.out.println("The Integers are :\n"+x[i]);
}
SelectionSort.sort(x,10);
System.out.println("The greatest Integer is:" +x);
//10 random Doubles\
Double[] d=new Double(10.0);**//cannot convert from java.lang.Double to java.lang.Double[]**
for (double k=0.0;k<10.0;k++)
{
d[k]=Math.random(1.0);**//cannot convert from double to int & the method random() in the type java.lang.Math is not applicable for the arguments (double)**
System.out.println("The Doubles are:\n"+d[k]);**//cannot convert from double to int**
}
SelectionSort.sort(d,10);
System.out.println("The greatest Double is:" +d);
//5 Random box objects
Random r=new Random();
Box[]b=new Box[5];
for (int i=0;i<5;i++)
{
int length=r.nextInt(30)+1;
int width=r.nextInt(30)+1;
int height=r.nextInt(30)+1;
b[i]=new Box(length,width,height);
System.out.println("The boxes are: "+b[i]);
}
SelectionSort.sort(b,5);
System.out.println("Boxes sorted by volume:\n");
for (int i=0;i<5;i++)
{
System.out.println(b[i]+ "Volume: "+b[i].volume());
}
//5 String names
String[] names={"Bobby","Freddie","John","Ralph","Usman"};
System.out.println("The Strings are: "+names);
Biggest.sort(names,names.length);//String implements comparable **//the method sort(java.lang.String[],int) is undefined for the type Biggest**
System.out.println("Sorted Strings\n");
for(int i=0;i<names.length;i++)
{
System.out.println(names[i]);
}
}
}```