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
English,
5 months ago
Business Studies,
5 months ago
Geography,
5 months ago
English,
10 months ago
Math,
10 months ago