+ 1

Can someone tell me d basic of this line...

public static void main(String args[]) tell me all d words what does it mean in program n what does these words do????

29th Mar 2018, 3:20 PM
Harsh Agrawal
Harsh Agrawal - avatar
5 Respuestas
+ 2
public - allows anything to access it static - there's no need to create an object to call it void - tells the compiler that the function doesn't return anything main(String args[]) - main is the function name, it takes in an array (list) of Strings (text) argument/parameter called args
29th Mar 2018, 3:24 PM
TurtleShell
TurtleShell - avatar
0
Inside the brackets there are something called parameters or arguments (can be blank). When you call a function you can pass values to these parameters if the function allows it (in this case main allows it). Strings are text and the [] means it is an array (list), they can also be before the name like... String[] args. args is just the name given to access this array.
29th Mar 2018, 3:35 PM
TurtleShell
TurtleShell - avatar
0
thnxxxx TurtleShell
29th Mar 2018, 3:37 PM
Harsh Agrawal
Harsh Agrawal - avatar
- 1
can u again explain me String args that we use inside d bracket TurtleShell
29th Mar 2018, 3:30 PM
Harsh Agrawal
Harsh Agrawal - avatar