We were using the Java programming language to play around and experiment with what the capabilities of what the language were. To do this, we used a piece of software called 'Processing' to do the coding and viewing in. We also used the help of the processing website. It contains a reference page which has lots of useful instructions and examples to help beginners to find their feet which I definitely made use of and found help from using.
Java Programming
Here's a quick video I made showing two example pieces of Java work I managed to create:
I can't deny the fact that I am not the best at using Java code. I understand it to a certain degree, but some of it still confuses me. However, I feel as if I effectively understand this piece of code I have created.

Initially, we see the 'void setup'. This is the beginning of any Java code, and defines certain basic features such as the document size and the background colour. I have mine set to 800 x 600, a standard web size and the background colour as black by using the RGB (red, green blue) system whereby the more you add of a certain colour of the three, the closer the overall colour will look to it.

Secondly, we have ‘void draw’. This is effectively the instruction that allows for the creation of various shapes. In my case, I created an oval. To make the oval, I had to create an ellipse and change the parameters of it, so, for a circle you would have to equal parameters of whatever size you wish, but in my case I made the high parameter much longer so as to create the oval.

The ‘fill’ section of the code ensures that the oval trail created by moving the mouse disappears in time. If you adjust the second parameter, it will change the length of time the trail takes to fade away, increasing the number will decrease the time, but decreasing it will lengthen the time it takes to fade away.
The ‘rect’ is effectively just a black rectangle (or so I think) that is the object that covers the trail thus allowing it to disappear.

The fill section determines the colour of the oval, it is set at 200 as the default colour in the blue section of RGB. This is the colour it will appear as when you launch the code in preview. However, as you’ll see, Red and Green are dependent on the location of the mouse on the document, meaning that depending on the on the X height of the mouse on the document, the value of red will change to it, and the same goes for green but on the Y axis.

No stroke just means there is no border for the oval. And finally, the ellipse is set to follow mouse movements, both on the X and Y axis.
First Java Program
Second java Programme
I only understand the basics of this piece of Java code, as I had some help when creating it. The size of the document is set to the standard 800 x 600 under the void set up.
Under the void draw section, you’ll see that the ‘rect’ is set to be 100 pixels by 100 pixels. And I believe the v.x and v.y section is dedicated for allowing the movant of the square when following the mouse. Though, I’m not sure. I also understand that the colours for the square are set to random on all Red, Green and Blue.
Taken from forum.processing.org