A static method can be accessed without creating an object of the class first: public class Main { // Static method static void myStaticMethod() { System.out.println("Static methods can be called without creatin
statichello() {// static method return"Hello!!"; } } mycar =newCar("Ford"); //Call 'hello()' on the class Car: document.getElementById("demo").innerHTML= Car.hello(); //and NOT on the 'mycar' object: //document.getElementById("demo").innerHTML = mycar.hello(); ...