Menu

[solved]-Trying Convert Ch Object Array Double Array Public Void Calculatesalesprice Double Salepri Q39066757

I am trying to convert ch which is an object array to a doublearray

public void calculateSalesPrice(){
double salePrice[]= new double[ch.length];
int p=0;
for(int i=0;i<ch.length;i+=3){
p=i+1;   
salePrice=ch[p].nextDouble();
}
error message:items.java:13: error: cannot find symbol
salePrice=ch[p].nextDouble();
^
symbol: method nextDouble()
location: class Object
1 error

Expert Answer


Answer to I am trying to convert ch which is an object array to a double array public void calculateSalesPrice(){ double salePrice… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *