Question
i nedd to know how to fix it
import javax.swing.JOptionPane: public class Conv void length (double d) JOptionPane.showMessageDialog(null, the equvialent
SLOVO publie main(String args) Conv c-new Conv(): boolean b=true; while(b) { int a Integer.parseInt(JOption Pane.showMessageD
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Here what I think you are doing wrong is that you are passing JOptionsPane.showMessageDialog() which is a GUI method and when you will see the docs for the method description you will get to know that showMessageDialog() has void in its return type. However, the method Double.parseDouble() expects some value which is void in this case hence the type checker is giving error. So to resolve this you must pass some value in the parseDouble() method.

Add a comment
Know the answer?
Add Answer to:
i nedd to know how to fix it import javax.swing.JOptionPane: public class Conv void length (double...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I'm attempting to convert ch object array to double array public void calculateSalesPrice() { double salePrice[]...

    I'm attempting to convert ch object array to double array public void calculateSalesPrice() { double salePrice[] = new double[ch.length]; int p = 0; for (int i = 0; i < ch.length; i += 3) { p = i + 1; for(int j = 0;j } } error message:items.java:16: error: cannot find symbol for(int j = 0;j ^ symbol: variable length location: class Object items.java:17: error: array required, but Object found salePrice[j] = (double full program import java.io.File; import java.util.Scanner; import...

  • I have this class determines how much petrol is being purchased and the cost. The gas...

    I have this class determines how much petrol is being purchased and the cost. The gas is divided between regular, premium, and super unleaded. The program reads (R, P, or S) that designates which kind of gasoline was purchased. class Petrol { private static final double Premium = 0; private static final double Super = 0; char gas; String type; double amount, cost; private String free; private double regular; Petrol(char ch, double a) { gas = ch; amount = a;...

  • Hello, i need help with this homework: Code provided: public class DirectedWeightedExampleSlide18 { public static void...

    Hello, i need help with this homework: Code provided: public class DirectedWeightedExampleSlide18 { public static void main(String[] args) { int currentVertex, userChoice; Scanner input = new Scanner(System.in); // create graph using your WeightedGraph based on author's Graph WeightedGraph myGraph = new WeightedGraph(4); // add labels myGraph.setLabel(0,"Spot zero"); myGraph.setLabel(1,"Spot one"); myGraph.setLabel(2,"Spot two"); myGraph.setLabel(3,"Spot three"); // Add each edge (this directed Graph has 5 edges, // so we add 5 edges) myGraph.addEdge(0,2,9); myGraph.addEdge(1,0,7); myGraph.addEdge(2,3,12); myGraph.addEdge(3,0,15); myGraph.addEdge(3,1,6); // let's pretend we are on...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT