>I have completed the basic concepts of C and C++.
I doubt that. C is very nuanced, to the point where you could have years of both heavy reading and practical experience, and still be surprised. C++ is a beast, where the "basic concepts" are both broad and deep. Your question suggests that you've reached completion with neither.
>I want to know whether should i go for file handling
>and database connectivity or should i go for java.
Quite frankly, Java seems better suited to your personality. If you think programming is so simple that you've "completed" C and C++, you're better off with a language designed for idio^H^H^H^H...um...for l33t h4k3rs with m4d sk1llz.
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: