16x2 LCD shows only black boxes in the bottom line

Hi everyone. I am new to this arduino programming.
I do have the same problem with interfacing LCD to my arduino.

I use JHD162A LCD . I have thoroughly checked the wiring and connections .
what i see is a blank line in the first row followed by square boxes in the next row when i uploaded the "Hello world "program from the arduino library.

I have connected a 5K pot to pin 3 of the lcd and i am able to adjust the contrast of the lcd as well ( that means the contrast gets changed for the second row only ) .

where did i mistake and please correct me.

Any help will be appreciated..
Thanks in advance.

Lcd_0.jpg