Android app development is a highly coveted subset of the larger development world. It is because of the massive popularity Android apps enjoy all over the globe - after all, it does have the most significant share in the global OS market. The widespread acclaim and demand have given rise to a variety of language options for app development. For the longest time, the title of market leader belonged to Java, but that's starting to change now that Kotlin has emerged as an equally potent choice.

Considering that both Java and Kotlin have proven to be highly cogent programming languages, enabling the development of world-class apps, it is quite understandable when people struggle to choose between the two. But don't fret, because this guide is here to help.

Kotlin: Kotlin was what Google came up with when the ecosystem demanded a more world-class language that was conducive for the addition of Java-like qualities in mobile apps. Based on the Java Virtual Machine, this open-source language can not only be easily compiled to JavaScript but also interface it with Java.

Pros:
  • Kotlin-based apps are written using already existent Java libraries and frameworks
  • Kotlin's type system has a null feature
  • It is much easier and quicker to code with Kotlin

Cons:
  • Its compilation speed is much slower than that of Java
  • The community is young, and the resources are limited

Java: An object-oriented language, Java is over two decades old. It is commonly used for the development of both mobile and web applications; in the context of mobile apps, while it is primarily used for Android, it can be used to build apps for other platforms as well.

Now that we are acquainted with Java and its basics, let's go on and see its pros and cons.

Pros:
  • It is one of the most recommended and preferred tools for the development of native as well as cross-platform app development
  • Since Java-based apps are smaller in size, they do not take as much space as other similar apps built using different languages, including Kotlin
  • With Java, the timeline for app development is accelerated to a considerable extent. It means that developers can code at a much faster pace

Cons:
  • It is known to throw up compatibility-related issues when it comes to Android API design
  • Java is notorious for being quite slow as compared to its peers

As the above discussion demonstrates, both Java and Kotlin bring a unique set of challenges and advantages to the table when Android app development is concerned. Then there's also the fact that each one of the two is suited for distinctive types of development endeavors.

Inadvertently, this can seemingly make the decision more complicated. But if you take the time to carefully evaluate each of the two languages' basic facts, their pros and cons, and then assess them against the project and business' requirements, it becomes quite simple to decide if you want to opt for Java web development services or find a vendor who will help you out with a Kotlin-based app.
DorothyBrown 4 february 2020, 11:27

image

PVS-Studio static analyzer team, which until recently was searching for bugs and potential vulnerabilities only in C, C++, and C# code, has prepared a new version of their tool for Java code as well. Despite the fact that in the Java world there is already a number of static analysis tools, developers believe that their analyzer can be powerful and will be a good competition.
Kate Milovidova 21 june 2018, 14:33

In this article I want to tell you about the experience of developing one unpretentious game for Android, which has repeatedly paid off at the development stage!

Prehistory
We started developing the game in the 10th grade. Before that, we had no experience in developing and promoting mobile games. There were only basic knowledge of Java and a little experience of creating websites. And that's all!

image
KlauS 23 october 2017, 13:55

On this Wednesday, August 30, at the office of Oracle, meeting JUG with Oleg Shelaev, Developer Advocate in the company ZeroTurnaround, which makes JRebel and XRebel. The topic of the meeting is the tools for creating multi-threaded Java programs (from designing bikes and starting threads to handles, to ForkJoinPools, green threads and transactional memory).
Of course, we asked which Java 9 chips are considered the most useful in ZeroTurnaround. As a result, they got hold of the article that you are reading right now. The original article Oleg published in the blog RebelLabs , there are many more interesting.
Papay 14 october 2017, 11:49

image How does the JVM create new objects? What exactly happens when you write a new Object ()?
At conferences, it is periodically told that the allocation of objects uses the thread-local allocation buffer (TLABs): memory areas allocated exclusively to each thread, creating objects in which is very fast due to the lack of synchronization.
But how correctly to choose the size of TLAB'a? What to do if you need to allocate 10% of the size of TLAB'a, but only 9% is free? Can an object be allocated outside TLAB? When (if) is the allocated memory set to zero?
Having asked these questions and did not find all the answers, I decided to write an article to correct the situation.
Before reading it, it's useful to remember how some garbage collector works
MeLavi 28 september 2017, 8:23

image

In this article we'll look at the main features of SonarQube - a platform for continuous analysis and measurement of code quality, and we'll also discuss advantages of the methods for code quality evaluation based on the SonarQube metrics.

SonarQube is an open source platform, designed for continuous analysis and measurement of code quality. SonarQube provides the following capabilities:
Kate Milovidova 16 november 2016, 12:13

Nowadays a lot of projects are opening their source code and letting those who are interested in the development of it edit the code. OpenJDK is no exception, programmers PVS-Studio have found a lot of interesting errors that are worth paying attention to.

OpenJDK (Open Java Development Kit) - a project for the creation and implementation of Java (Java SE) platform, which is now free and open source. The project was started in 2006, by the Sun company. The project uses multiple languages- C, C++, and Java. We are interested in the source code written in C and C++. Let's take the 9th version of OpenJDK. The code of this implementation of Java platform is available at the Mercurial repository.

During verification, the analyzer found different errors in the project including: copy-paste, bugs in the operation precedence, errors in logical expressions and in pointer handling and other bugs, which are described in detail in this article.

It's always amusing to check a project which is used and maintained by a large number of people. The better and more accurate the code is, the more safely and effectively the program will work. Those bugs we found, are another proof of the usefulness of an analyzer, as it allows the detection of such errors which would otherwise be hard to detect doing simple code review.
Kate Milovidova 17 june 2016, 9:00

Do you know how much memory the string has? I have heard all kinds of answers to this question, ranging from "do not know" to "string has 2 bytes". Here are some more questions: How much space does empty string take? How much space does the class object of Integer take? How much space will take your own class object with three Integer fields? It is funny, but none of my Java programmer friends could answer these questions ... Most of us do not need it, and nobody will think about it in the real java projects. After all, this is the same as you would not know the engine capacity of vehicle that you drive every day. You can be a great driver and did not even know what 2.4 or 1.6 means on your car. But I am sure that there are few people who are not familiar with the meaning of these numbers. So why do java programmers know so little about this part of their tool?

Integer vs int

We all know that in java - everything is an object. Except, perhaps, primitives and references to the objects themselves. Let us consider two typical situations:
ZimerMan 8 february 2012, 14:12

This article explains how to implement some data structures in Java. It will be useful for beginners that use a programming language Java, as well as those who already know how to write a new ArrayList (), but have little knowledge what is happening inside.

image

Let us talk about the ArrayLists

ArrayList implements the List interface. As we know, Java arrays have a fixed length, and after the array is created, it cannot increase or decrease. ArrayList can change its size at runtime, but it does not necessarily indicate the size when an object is created. The elements of ArrayList can be any types, including null.
ZimerMan 17 december 2011, 18:29