How do I create a JSON array in Java

How do I create an Array, ArrayList, Stack and Queue in Java?

Without further details of what the question is, exactly to ask, I will answer the title of the question

Create one:

Create one:

Does this mean you create one of and objects. you Not use because that is a primitive data type see the link for a list of primitive data types.

Create one:

Create one: (with LinkedList)

Same as a, this declaration means the following: create one of and objects.


Update:

In response to your comment from the other answer,

i am pretty confused now why the use of strings. and what does power mean

We're using only as a pure example, but you can use any other objectbut the most important point is that you get one objectNot a primitive type. Each primitive data type has its own primitive wrapper class, see link for the list of primitive data type wrapper class.

I've posted some links to explain the difference between the two, but here are a list of primitive types

    That means you are not allowed to have an integrity like so:

    You can also make your own objects, here is my object that I created

    Here we have an object, but now in our class we want to write down all of our 's, we can do that, so let's add them to one

    (I helped my friend's brother with a java game and he had to do something along those lines, but I hope the example was well documented)

    Shareimprove this answer