How do you call a method in main method in Java?

Call a Method Inside main , call the myMethod() method : public class Main { static void myMethod() { System.out.println(“I just got executed!”); } public static void main(String[] args) { myMethod(); } } // Outputs “I just got executed!”

Sizin İçin Seçtik  Can TensorFlow be used in face detection?

Leave a Reply

Your email address will not be published. Required fields are marked *

How do you call a method in main method in Java?

Call a Method Inside main , call the myMethod() method : public class Main { static void myMethod() { System.out.println(“I just got executed!”); } public static void main(String[] args) { myMethod(); } } // Outputs “I just got executed!”

Sizin İçin Seçtik  Dövize yatırım yapmak caiz mi?

Leave a Reply

Your email address will not be published. Required fields are marked *