Your code would be easier to read if you enclosed it in [ code] tags. It would also be helpful if you said what line Netbeans was complaining about.
Quote:
Originally Posted by ShakespeareIJP
public MySolenoid(1 , 2){
solenoidBoo = true;
uno = new Solenoid(8, 1);
dos = new Solenoid(8, 2);
System.out.println("We have liftoff" + 1 + " and " + 2);
}
|
What are you trying to do here? public MySolenoid(1 , 2) isn't valid syntax for a class declaration, constructor, or method.
In addition, you'll get a runtime error for uno = new Solenoid(8, 1); because 8 isn't a valid solenoid module.