well guys this is my code
the code doesnt work if i have this if statement. If i make the if comments the super(x); works fine. ( super(x); calls a method from the Box class. please help. In compiler it says cannot find symbol - constructor Box
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
well guys this is my code
the code doesnt work if i have this if statement. If i make the if comments the super(x); works fine. ( super(x); calls a method from the Box class. please help. In compiler it says cannot find symbol - constructor Box
Last edited by copeg; March 31st, 2011 at 10:54 AM.
In the future please use the code tags, which make your code readable.
What is Box? Does it have the constructor you are calling? Second, super must be the first call made in the constructor.
Well yes the constructor i call yes there is in the Box class. The Box construtctor takes a double x and it creates a cube. all i want to do is to prevent the Box to create a cube if i a negative value is given...
Problem solved thx