main method can be declared as private
Answers
Answered by
0
Answer:
Yes, we can declare main method as private. It compiles without any errors, but in runtime, it says main method is not public.
Answered by
0
Answer:
Yes, we can declare main method as private. It compiles without any errors, but in runtime, it says main method is not public.
Similar questions