A variable is data that is stored in the computers memory. A variable can be a number (Integar, Float) or just one letter or number (Char) or it can be a string of letters or number (String) in some programming languages like Java and C/C++ you need to declare and initialize the variable, this means that you have to say what type it is and what it is called.  With some scripting languages like Python and PHP you don’t have to declare them which means that you don’t have to say what type they are you just give them an name.

How to declare and initialize in Java:

int foo;

foo = 15;

String foo1;

foo1 = “String”;

How to declare and initialize in Python: 

foo = 15

foo1 = “String”

This is a very basic introduction, hope this has helped someone.

Tracking GIR!


2 Responses to “Programming Variables Very Basic”  

  1. 1 flionheart

    Good lesson pete :D better than crappy college work right now :P

  2. 2 Pete

    heheh

Leave a Reply




    HI, I'm Pete. I'm studying HND Computing and I'm trying to buy Stargate SG-1 Seasons 1 - 10 box set. I'm hoping that if I write lots of really useful information that some nice people might donate some money to me so I can buy all of the Stargate Seasons