0
What's wrong with this code, I ran it , it has no output
public class Animal { void bark() { System.out.println("Woof-Woof"); } }
2 Antworten
+ 5
Where is your main method?
Try something like this.
public class Program
{
public static void bark(){
System.out.println("woof-woof");
}
public static void main(String[] args) {
bark();
}
}
0
Hey.. others are confused. Write the main method or make connection with a class file which has a main method