Exploring the Advantages of Java for Android Development

  • Java
  • Thread starter Alex_Sanders
  • Start date
  • Tags
    Java
In summary, Java is a popular language because it is easy to write code that runs on many different hardware platforms, it is fast, and there is no need for a Java Virtual Machine.
  • #1
Alex_Sanders
73
0
The Android system is an OS by java for java, but why? What significant advantage does java posses over other languages? Is it because high-end hardware are so cheap and numerous, that no one need to think about the runtime efficiency anymore? Or because google want to make money, and somehow consider java is somehow more developer-friendly comparing to others?
 
Technology news on Phys.org
  • #2
The original reason for Java was to have a language where you could run the exact same code on any hardware. This is accomplished by having a 'virtual machine' on each hardware that runs the Java code. In answer to your question, there are many, many applications where run-time efficiency is irrelevant because the hardware is so fast. If I want to run a little piece of code on some web page, it doesn't matter whether the code takes 1 microsecond or 100 milliseconds to run, because in either case it happens instantaneously as far as the user is concerned. The important thing is that the code runs on whatever machine the user has and and doesn't crash.
 
  • #3
phyzguy said:
The original reason for Java was to have a language where you could run the exact same code on any hardware. This is accomplished by having a 'virtual machine' on each hardware that runs the Java code. In answer to your question, there are many, many applications where run-time efficiency is irrelevant because the hardware is so fast. If I want to run a little piece of code on some web page, it doesn't matter whether the code takes 1 microsecond or 100 milliseconds to run, because in either case it happens instantaneously as far as the user is concerned. The important thing is that the code runs on whatever machine the user has and and doesn't crash.


How about flash player? Flv video stream? It's a nightmare even on desktop comps. Flash player, Plugin-container for Firefox especially, eats up tons of my hardware resources and yield no satisfying results. And they have been updating it every week or so.
 
  • #4
I think video streaming needs to be fast so using Java is not an option. Getting software to run cleanly on the huge number of hardware platforms that are out there is not easy, which is why they keep updating it. I don't know the details.
 
  • #5
Alex_Sanders said:
The Android system is an OS by java for java, but why?

No, it's not. Android is Linux - i.e. it's written mostly in C & C++.

The SDK is in Java. However, Android doesn't have a Java Virtual Machine. And it doesn't execute byte-code. It runs something called Dalvik - which I think is more like an executable than something regular java stuff.

Anyway, a good programmer can architect a Java based application which runs faster than a C++ one made by a bad programmer - Check out mailinator - http://mailinator.blogspot.in/2007/01/architecture-of-mailinator.html
 
Last edited:
  • #6
Alex_Sanders said:
How about flash player? Flv video stream? It's a nightmare even on desktop comps. Flash player, Plugin-container for Firefox especially, eats up tons of my hardware resources and yield no satisfying results. And they have been updating it every week or so.

For exactly that reason I have disabled the plugin-container in about:config of my firefox. sorry for going off topic but i just cannot resist it. The plugin-container is really kind of slow for video.
 

Related to Exploring the Advantages of Java for Android Development

1. What is Java and why is it used for Android development?

Java is a high-level, object-oriented programming language that is widely used for developing applications on various platforms. It is the primary language used for Android development because it is platform-independent, has a large and active community, and offers extensive libraries and tools for developing mobile applications.

2. What are the advantages of using Java for Android development?

There are several advantages of using Java for Android development. Firstly, it is an established and mature language with a wide range of resources and support available. It also offers a large community of developers, making it easy to find help and resources. Additionally, Java is highly versatile and can be used to develop a variety of applications, from simple to complex. It also has a robust security system, making it a safe choice for developing mobile applications.

3. Can Java be used for cross-platform development?

Yes, Java is a cross-platform language, which means that it can be used to develop applications for multiple operating systems and devices. This makes it an ideal choice for Android development, as it allows developers to create applications that can run on a wide range of devices without the need for significant modifications.

4. What are the key features of Java that make it suitable for Android development?

Java offers several features that make it an ideal language for Android development. These include its platform independence, automatic memory management, robust security, and extensive libraries and tools. Additionally, Java is highly scalable, making it suitable for both simple and complex applications. It also supports multi-threading, which is essential for developing high-performance applications.

5. Are there any drawbacks to using Java for Android development?

While Java offers many advantages for Android development, it also has some drawbacks. One of the main disadvantages is that Java is a verbose language, which means that it requires writing more code compared to other languages. It can also be challenging to learn for beginners, particularly if they have no prior programming experience. However, with the help of resources and communities, these challenges can be overcome, and the benefits of using Java for Android development outweigh the drawbacks.

Similar threads

  • Programming and Computer Science
Replies
1
Views
1K
Writing: Input Wanted Number of Androids on Spaceships
  • Sci-Fi Writing and World Building
Replies
21
Views
1K
  • Programming and Computer Science
Replies
27
Views
13K
  • STEM Career Guidance
Replies
4
Views
2K
  • STEM Career Guidance
Replies
5
Views
2K
  • STEM Career Guidance
Replies
25
Views
3K
Replies
127
Views
18K
  • STEM Academic Advising
Replies
5
Views
1K
Replies
8
Views
1K
Back
Top