
10-08-2008, 08:41 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,065
|
|
If you are using local variables, you must declare them before use. For instance/class variables you don't need to do it, default values are automatically declared.
temp1 = JOptionPane.showInputDialog("The First Number is:");
num1 = Integer.parseInt(temp1);
temp2 = JOptionPane.showInputDialog("The Second Number is:");
num2 = Integer.parseInt(temp2);
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Someone helped you? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post. Help: To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. Resources: To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. Web: To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. Tips: To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|