camzio Small

Greenhorn
+ Follow
since Oct 20, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by camzio Small

Hi I am new to java and having problems using the JOptionPane?
I was wondering why I am being asked to initialise a String? infact even when I initialise the String it quite rightly states this is an int. I cannot see what I have done wrong and can't find any help as to why this is. any help would be much appreciated. Thank you very much

//
public static void main(String[] args)
{
int side1, side2, side3 ;
String side1Str, side2Str, side3Str, result;

side1Str = JOptionPane.showInputDialog("Enter side1");
side1 = Integer.parseInt(side1Str);

side2Str = JOptionPane.showInputDialog("Enter side2");
side2 = Integer.parseInt(side1Str);

side3Str = JOptionPane.showInputDialog("Enter side3");
side3 = Integer.parseInt(side1Str);

if ((side1 > side2) == true)
if((side1 < side3) == true)

result = "That is an isosceles Traingle";
// JOptionPane.showMessageDialog (null, result); // This is the line I am having trouble with//

//
11 years ago