Run ❯
Get your own Java server
❯Run Code Ctrl+Alt+R
Change Orientation Ctrl+Alt+O
Change Theme Ctrl+Alt+D
Go to Spaces Ctrl+Alt+P
public class Main { // Static method static void myStaticMethod() { System.out.println("Static methods can be called without creating objects"); } // Main method public static void main(String[] args) { myStaticMethod(); // Call the static method Main.myStaticMethod(); // Or call it using the class name } }
Static methods can be called without creating objects
Static methods can be called without creating objects