analogRead and digitalRead not working correctly?

I am beginner with Arduino Uno. Recently i have started to use functions analogRead and digitalRead.. With analogRead and digitalRead it still shows some kind of voltage even if there is nothing connected to the pin, if I use analogRead it shows 1,2-4V and with digitalRead it shows some random 1 and 0 when there is nothing connected to pin. Im using DigitalReadSerial and ReadAnalogVoltage codes from examples. Have i broken my Arduino or is this what it should detect?

Thanks for help, and sorry for my bad English.

It's a condition called a "floating input".

It is perfectly normal.

If you add a pull up resistor to your digital input your reading will work as you expect.
You can do this in software for input D2 as follows:
pinMode(2,INPUT); //make the pin an input
digitalWrite(2,HIGH); //turn on the pull up resistor
OR as of version 1.00 of the IDE
pinMode(2,INPUT_PULLUP); //make the pin an input and turn on the pull up resistor
OR you can add a 10K ohm resistor from pin 2 to 5V.
For your analog inputs, connect a 10K ohm resistor from the pin to GND.

Read all about it here:- http://www.thebox.myzen.co.uk/Tutorial/Inputs.html

Ohh ok, thank you guys , i already tried ''OR you can add a 10K ohm resistor from pin 2 to 5V. For your analog inputs, connect a 10K ohm resistor from the pin to GND.'''and it worked fine. I guess i should have read more.