cannot resolve constructor

I'm having a problem with some of my constructors in the class i am developing. The class has two constructors: A default no argument constructor, and a constructor that takes in 2 ints. The no-argument constructor works fine, but whenever i try to use the 2 arg constructor, i keep getting a cannot resolve symbol compile error.

I've tried using integer numbers and integer variables in the call, but neither work. I've tried chaning the argument types to see if a a different combination would work (ie. String, int), but that is also a no go. As far as I can tell, everything seems to be standard, and should work. here is a cut down version of the class i am using:

publicclass conTest{

privateint stuff1;

privateint stuff2;

privatevoid conTest(int s1,int s2){

stuff1 = s1;

stuff2 = s2;

}

}

and here is the test case i am using to try and get it to work:

publicclass test{

publicvoid main (String args[] ){

conTest tester =new conTest(10,10);

tester.printStuff();

}

}

Any input that could help figure out this problem would be greatly appreciated.

[1889 byte] By [aserothbwa] at [2007-11-26 18:36:14]
# 1
> private void conTest(int s1, int s2) {This is a method, not a constructor. Constructors don't have return types (the thing I bolded).
warnerjaa at 2007-7-9 6:10:16 > top of Java-index,Java Essentials,Java Programming...
# 2
And you can make us all happier by starting your classes with a capital letter: ConTest and Test.
DrLaszloJamfa at 2007-7-9 6:10:16 > top of Java-index,Java Essentials,Java Programming...
# 3

> I'm having a problem with some of my constructors in

> the class i am developing. The class has two

> constructors: A default no argument constructor, and

> a constructor that takes in 2 ints. The no-argument

> constructor works fine, but whenever i try to use the

> 2 arg constructor, i keep getting a cannot resolve

> symbol compile error.

> I've tried using integer numbers and integer

> variables in the call, but neither work. I've tried

> chaning the argument types to see if a a different

> combination would work (ie. String, int), but that

> is also a no go. As far as I can tell, everything

> seems to be standard, and should work. here is a cut

> down version of the class i am using:

>

> public class conTest {

>

> private int stuff1;

> private int stuff2;

>

>

> private void conTest(int s1, int s2) {

> stuff1 = s1;

> stuff2 = s2;

> }

> }

>

> and here is the test case i am using to try and get

> it to work:

>

> public class test {

>

> public void main (String args[] ) {

>

> conTest tester = new conTest(10,10);

>

> tester.printStuff();

>

> }

>

> }

>

> Any input that could help figure out this problem

> would be greatly appreciated.

Also the contructor is private so you can not use it outside of the class.

kikemellya at 2007-7-9 6:10:16 > top of Java-index,Java Essentials,Java Programming...