public static void main String arg in java is it fixed

0 votes
I was recently asked in an exam if public static void main(String arg[]) format of main method was fixed? Can we change it? Can we use main without any of public, static or void? If not, why is it not hard coded that main(String arg[]) would stand for public static void main(String arg[]) always?
Apr 19, 2022 in Java by Rahul
• 3,380 points
588 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Java

0 votes
1 answer
0 votes
1 answer

Why the main() method in Java is always static?

As you might know, static here is ...READ MORE

answered May 9, 2018 in Java by geek.erkami
• 2,680 points
1,897 views
0 votes
2 answers

Why it is not possible to define a static method in a Java interface?

Interfaces are concerned with polymorphism which is ...READ MORE

answered Aug 27, 2019 in Java by Sirajul
• 59,230 points
1,568 views
0 votes
1 answer

What is the difference between main(String[] args) and main(String... args) in Java?

String[] is used to accept a single parameter ...READ MORE

answered Sep 6, 2019 in Java by Piya
3,444 views
0 votes
0 answers

What is "String args[]"? parameter in main method Java

I am a beginner in java and ...READ MORE

May 15, 2022 in Java by Kichu
• 19,050 points
317 views
0 votes
1 answer

Why main method is static in Java?

In Java, the `main` method is required ...READ MORE

answered Oct 19, 2023 in Java by anonymous
• 3,320 points

edited Oct 19, 2023 by anonymous 310 views
0 votes
3 answers

Check if a String is numeric in Java

Java 8 Lambda Expression is used: String someString ...READ MORE

answered Sep 3, 2018 in Java by Daisy
• 8,120 points
3,376 views
0 votes
2 answers

What is the use of toString method in Java and how can I use it ?

Whenever you require to explore the constructor ...READ MORE

answered Aug 23, 2018 in Java by Daisy
• 8,120 points
3,795 views
0 votes
2 answers

What is the use of @Override annotation in Java ? When do we use it ?

@Override annotation is used when we override ...READ MORE

answered Aug 14, 2019 in Java by Sirajul
• 59,230 points
3,109 views
0 votes
1 answer

What is ?: this operator called in java ? how dose it function?

? :  is the Conditional operator and is ...READ MORE

answered Jun 11, 2018 in Java by sophia
• 1,400 points
742 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP