What is the differnece between public static void main string args and psvm string args

0 votes

What is the differnece between

public static void main string args[] and public static void main string []args ?
Nov 20, 2018 in Java by Jino
• 5,810 points
1,953 views

1 answer to this question.

0 votes

Before getting to this you should understand as what does String args[] here means:

https://www.edureka.co/community/3013/purpose-of-string-args-in-the-psvm-of-java

Coming to your question there is no difference in both of them.

its just the syntax of array

you can define array in both ways 

int a[]={1,2,3};

int []a={1,2,3};
answered Nov 20, 2018 by Nabarupa

Related Questions In Java

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,452 views
+1 vote
4 answers

What is the difference between string object and string literal?

A String literal is a Java language concept. This ...READ MORE

answered Aug 16, 2019 in Java by Sirajul
• 59,230 points
65,072 views
0 votes
0 answers

public static void main(String arg[ ] ) in java is it fixed?

I was recently asked in an exam ...READ MORE

Apr 19, 2022 in Java by Rahul
• 3,380 points
592 views
0 votes
1 answer

What is the difference between jdk and jre?

JRE: It stands for Java Runtime Environment. ...READ MORE

answered Apr 20, 2018 in Java by Akrati
• 3,190 points
1,700 views
0 votes
1 answer

Purpose of “String args[]” in the “psvm” of Java

Let me give you the complete explanation ...READ MORE

answered May 7, 2018 in Java by code.reaper12
• 3,500 points
4,292 views
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,906 views
0 votes
1 answer

What is the difference between static and inner class?

An inner class, cannot be static, so ...READ MORE

answered Jul 11, 2018 in Java by sophia
• 1,400 points
1,016 views
0 votes
1 answer

Running Java program without main method.

This would have worked fine till Java ...READ MORE

answered Nov 21, 2018 in Java by Anoop
474 views
0 votes
2 answers

What is the difference between implements and extends?

Extends : This is used to get attributes ...READ MORE

answered Aug 3, 2018 in Java by samarth295
• 2,220 points
15,320 views
0 votes
2 answers

What is the syntax to initialize an array?

Rather than learning un-Official websites learn from ...READ MORE

answered Aug 2, 2018 in Java by samarth295
• 2,220 points
709 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