I have been teaching my self Java for a few months now, because I want to start developing apps for android.
I understands basic things like variables and methods, in addition to Polymorphism, inheritance, exception handling, I/O...
But I also want to build robots, and from what I understood, JVM is just too large for most micro-controllers out there like the Arduino .
I heard that Arduino uses a modified sort of C, which is easier to deal with.
But I feel that this "easy C" will restrain me, and I don't want that. I want to get my hands dirty in some complicated code
Some people say that I can program a raspberry pi in Java.
A few universities in my country offer discounts for extracurricular activities, so may be I can continue with java and get a certificate from oracle to get the discount.
but I'm not sure what to do
You have already discussed robots in a different thread, and I seem to remember that Java® could be used. There is nothing wrong with learning C. It is a useful language. But it is very different from Java®. C is good for low‑level programming, operating systems, etc. I don't know what sort of C the Arduino uses.
It's true. The Arduino is programmed in a C-like language. Of course, Java itself is rather C-like, although Arduino's language isn't OOP any more than straight C is.
The rumors about the Raspberry Pi are definitely true. The Pi version of Minecraft is a Java app - and a good counter to the unwashed creatures who assert that Java is slow.
C (and C++) is good to know. OS kernel and device driver code is often written in C. But there are plenty of fun things you can do in robotics with just Java.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
Learning C is great alone just for the knowledge you will learn about computer programming. C will be also beneficial if you will get interested in programming iOS or OS X. Both of those use Objective-C as their primary programming language.
C is definitely a great selection for robotics. You will have a great choice of microcontrollers to program. I remember when as a kid I built self-made programmer for Atmel ATMega-8 and coded it in C. There was so much fun with it.
If you want to get seriously into robotics, I would recommend to forget about Arduino or Raspberry Pi for now. If you learn electronics and programming of little microcontrollers first, you will gain great fundamental knowledge how those things work. Using those boards like Arduino is kinda like getting into self-driving car in order to learn how to drive a car.
Yes, I think C would be good for you to know. I've done a bit of Arduino coding, and that does use a language that is a subset of C. It makes device-control fairly easy, in ways that Java doesn't. When you need to use C to get something done, the Java Native Interface (JNI) lets you call C routines from Java. It's a bit hard to learn, but not impossible.
If you don't want to learn both at the same time (and I suggest you shouldn't try), start with Java. It makes it (nearly?) impossible to commit some of the mistakes that baffle early C programmers, like trying to read or write outside the boundaries of an array. Those types of errors can lead to run-time behavior that beginners often find inscrutable, like crashes that occur when function returns, because an improper access corrupted the call stack and your "return" jumps you to some random location.
"Il y a peu de choses qui me soient impossibles..."
They say a good programmer knows many languages, but knowing C and Java are a good combination as one is procedural whilst the other is object-orientated. They also make excellent preparation for learning C++.
Where Java is a "work horse" language, C is a more fundamental language for systems programming, and small programs. Instead of choosing between the two, use C as a break from your Java work and take pride in learning how to create programs using a simple text editor and assist your compiling with a make file. A quick session of 20 minutes will do wonders, so long as you don't rush it...