Hi everyone!
I´m here again boring you:) (hope not)
there is the thing: i´m running this
java code in comand promt but it gives me this error:
Main method not found in class DrumKit, please define the main method as:
public static void main(
String[] args)
There is my code:
class DrumKit{
boolean topHat = true;
boolean snare = true;
void playSnare(){
System.out.println("bang bang ba-bang");
}
void playTopHat(){
System.out.println("ding ding da-ding");
}
}
class DrumKitTestDrive{
public static void main(String[] args){
DrumKit d = new DrumKit();
d.playSnare();
d.snare=false;
d.playTopHat();
if(d.snare == true){
d.playSnare();
}
}
}
thanks for your time.