Self-Instantiating Class? I'm kinda lost...

Heya its me again. Trying to get some additional knowledge. I’m barely starting to work with classes and there’s a syntax I don’t quite understand. HEre’s a Unity example:

class Test extends System.Object {
    var p = 5;
    var c = Color.white;
}
var test = Test ();

Now why is a class often having a variable referencing the class itself? Is this so there’s only a permanent instance of the script? Is it so I can simply refer to Test.p without additionnal references? Am I totally wrong?

Also, when should I use the new keyword? I tend to just do trial and error and that makes me feel stupid,hehe.

Any hint is appreciated :slight_smile:

Did you read through this?
http://forum.unity3d.com/threads/34015-Newbie-guide-to-Unity-Javascript-(long)?highlight=unityscript

Working on it /shy.