why error am just calling a method inside main | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

why error am just calling a method inside main

public class program{ public static void main(String[]args){ public static void Fun(){ int a = 15; int b = 15; System.out.println(a+b); } Fun(); } }

15th Jun 2018, 3:26 PM
youk
2 Answers
+ 2
all right thankx for explain
15th Jun 2018, 3:47 PM
youk
+ 1
so we can't create a method inside main
15th Jun 2018, 3:35 PM
youk