+ 1

Why are Android apps written in Java, but the OS is written in C++?

can you please answer my question. 😊

10th Feb 2018, 2:17 PM
Saif
Saif - avatar
2 Answers
+ 13
Not necessarily. Android apps can also be made using other supported languages and C++ is one of them. BTW, Android OS is not written ONLY with C++. https://en.m.wikipedia.org/wiki/Android_(operating_system)
10th Feb 2018, 2:26 PM
Dev
Dev - avatar
+ 1
C/C++ is only used for some parts, just as we can do in our own Java projects. Mostly low-level parts like the kernel, which is basically the brains of the entire OS, that need to be really fast and use as little memory as possible. The faster the kernel can run the faster the device can run, and with a smaller kernel you save a little space in RAM for other programs. Of course memory isn't as much of a concern any more, but processing power will always be and because they keep shrinking processor-building technology they've finally reached a point where going any smaller is becoming an issue. Smaller is faster as it's less distance for the electricity to travel of course, but they're roughly to the point that they cannot safely build any smaller.
10th Feb 2018, 8:00 PM
Tom Shaver
Tom Shaver - avatar