₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,009 members, 8,419,900 topics. Date: Thursday, 04 June 2026 at 06:59 AM

Toggle theme

JAVA Syntax Correction. - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingJAVA Syntax Correction. (1108 Views)

1 Reply (Go Down)

JAVA Syntax Correction. by Mckayce(op): 2:04pm On Jul 17, 2016
Help me Java gurus.

Fulaman
sonoflucifer
dhtml
CC: EVERYONE
//PLEASE i find it very confusing when learning java and reading already made java programs ...... when reading my java tutorials i see main(String args[]) but when i look at programs i see main(String[] args)..

please which is correct or am i getting something wrong
Re: JAVA Syntax Correction. by Nobody: 2:19pm On Jul 17, 2016
The square brackets indicate an array.

In Java, you can declare an array using either method.
Put the square brackets after the type or after the variable.
String[] args or String args[] creates an array named args.
Re: JAVA Syntax Correction. by Mckayce(op): 6:04am On Jul 18, 2016
thanks
Re: JAVA Syntax Correction. by Anmich: 9:13am On Jul 18, 2016
Mckayce:
Help me Java gurus.

Fulaman
sonoflucifer
dhtml
CC: EVERYONE
//PLEASE i find it very confusing when learning java and reading already made java programs ...... when reading my java tutorials i see main(String args[]) but when i look at programs i see main(String[] args)..

please which is correct or am i getting something wrong
Both of them are correct and that section is where the program starts execution from. There can only be one of that in a java program
1 Reply

I Have A Very Import Question On Python SyntaxJavascript Function Declaration Syntax: Var...Programming Your Own Code Syntax Highlighter234

Php Micro FrameworkStep-step Guide On Java, C, Javascript, Php, Python, Ruby, FORTRAN, E.tc.How To Disable Lock Screen Ads On Opera Mini.