I am new with raspberry pi. Actually I am coming from Java background. Which programming should I use for raspberry pi tasks? The choices are given below:-
Kindly suggest me which one of them should I choose?
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.Sign up to join this community
This is largely a matter of opinion; these are two different languages with their own strengths and weaknesses.
That said, the rpi community seems very partial to python, and so you have various python libraries for doing pi (or: linux based GPIO dev board) specific things. If you are interested in connecting I2C devices from retailers like adafruit, there is often python helper code and corresponding tutorials.
However, you don't actually need python to do any of that. The I2C interface is a native C API (and very very simple), so if you know C, you could incorporate than into Java via the JNI, which someone else has already done (so if you don't know C, you should be able to use that).
As explained here the GPIO interface uses file nodes and is therefore in fact language agnostic: other than basic I/O, you don't need any additional libraries at all.
So there's nothing you can do in python in the pi that you can't do in java as well. My personal suggestion, if you don't already know one of the big 3 "dynamically typed object oriented" languages -- python, perl, and ruby1 -- is to try one. Java is great, but dynamic typing is a very interesting contrast and knowing one of those (my own preference is perl) is definitely worthwhile.
I have been programming for more than 40 years, and while c(and its successors) is my preferred language, since getting a Pi I have been using Python. If you know java this should not be too different, but I can recommend "Learning Python" 5th Edition.
You also asked about editors. The Pi has IDLE, which is a Python IDE. I strongly recommend Geany, which is easy to use.
Both of these are GUI, so if you are developing remotely you should use VNC (install tightvncserver on the Pi).
You don't mention what laptop you are using, but Mac, Windows and Linux all have support, but details differ.