0

Hello,

I a student and Java is very new to me. I am trying to multiply 2 numbers together to be displayed in a dialog box but I keep getting the error of "cannot find sysmbol" and I do not know what I am missing in my file to clear this up and compile. Is there anyone who can help me? Below I have pasted in the file I created and symbol errors I am getting when trying to compile. I think it is something very simple to fix but I am so new to this I can't figure it out and I am not even sure if I created this file correctly because I can't get it t compile and run. Please Help!!

[ This is the file I created to multiply two numbers together to be displayed in a dialog box. I should have an input box for each value to be entered and then a dialog box to show the results.

import javax.swing.JOptionPane;

public class Multiply


{
    public static void main(String[] args)
	{
	int firstvalue;
	int secondvalue;
	int totalvalue = firstvalue * secondvalue;
firstvalue = 
	integerparseInt(JOptionPane.showInputDialog
	(null, "What is the first number value?"));
secondvalue = 
	integerparseInt(JOptionPane.showInputDialog
	(null, "What is the second number value?"));
totalvalue =
	integerparseInt(JOptionPane.showInputDialog
	(null, "Total Value:"));
	
	JOptionPane.showMessageDialog(null, "First Number Value\n" +
	    firstvalue + "Second Number Value\n" + secondvalue +
	    "Total Value" + totalvalue);
	System.exit(0);
	
	}
}

[Command Line Error received (X3 - one for each of my statements)

Multiply.java:18 cannot find symbol
symbol : method integerparseInt(java.lang.string)
location : class Multiply
integerparseInt(JoptionPane.shoeInputDialog

*Note the up arrow symbol is under the "i" at the beginning of the last line of this error.]

Edited by __avd: Added [code] tags.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by javaAddict
0

Have you declared a method integerparseInt somewhere? The error was pretty clear.
It said it could not find symbol. Symbol: method integerparseInt. Meaning that it could not find the method integerparseInt because it doesn't exist. Try to read more carefully the errors that you get and not just expect others to read them for you. You should be able to fix those simple ones on your own.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.