Difference between String[] (with square brackets) and String (without square brackets) in Java -


this question has answer here:

just starting learn java, found "string" in function has 2 square brackets beside:

public static void main (string[] parameter){     system.out.println("hello world"); } 

but 1 has not:

public void setname(string name){     this.name = name; } 

what diference?

[] signifies array, or list of many strings, whilst string 1 string.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -