Your problem is that you never actually assign triangleType, the string data, to be equal to the return value of triangleType(), the function. So every time you print triangleType the variable, you get null since you never defined it to be anything.
Make triangleType private and call it as part of your constructor, with a statement like
[code=java]
triangleType = triangleType(s1 , s2, s3);
[/code]
Make triangleType private and call it as part of your constructor, with a statement like
[code=java]
triangleType = triangleType(s1 , s2, s3);
[/code]
Comment