array(2) {
  ["en"]=>
  array(10) {
    ["id"]=>
    int(7)
    ["order"]=>
    int(0)
    ["slug"]=>
    string(2) "en"
    ["locale"]=>
    string(5) "en-US"
    ["name"]=>
    string(7) "English"
    ["url"]=>
    string(53) "https://solvery.io/blog/en/interesting/learning-java/"
    ["flag"]=>
    string(93) "https://solvery.io/blog/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/us.png"
    ["current_lang"]=>
    bool(true)
    ["no_translation"]=>
    bool(false)
    ["classes"]=>
    array(5) {
      [0]=>
      string(9) "lang-item"
      [1]=>
      string(11) "lang-item-7"
      [2]=>
      string(12) "lang-item-en"
      [3]=>
      string(12) "current-lang"
      [4]=>
      string(15) "lang-item-first"
    }
  }
  ["ru"]=>
  array(10) {
    ["id"]=>
    int(10)
    ["order"]=>
    int(0)
    ["slug"]=>
    string(2) "ru"
    ["locale"]=>
    string(5) "ru-RU"
    ["name"]=>
    string(14) "Русский"
    ["url"]=>
    string(27) "https://solvery.io/blog/ru/"
    ["flag"]=>
    string(93) "https://solvery.io/blog/wp-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/ru.png"
    ["current_lang"]=>
    bool(false)
    ["no_translation"]=>
    bool(true)
    ["classes"]=>
    array(4) {
      [0]=>
      string(9) "lang-item"
      [1]=>
      string(12) "lang-item-10"
      [2]=>
      string(12) "lang-item-ru"
      [3]=>
      string(14) "no-translation"
    }
  }
}
28.04.2021

Learning Java: instructions for beginners

Learning Java: instructions for beginners

We collected ways to learn the Java programming language for free and for a fee, and developed a short guide on how to start learning. We analyzed the ways to learn Java and found the most optimal one among them.

Why learning Java is cool and promising

What is the Java language?

What is being developed in Java

How much does a Java programmer earn?

How to start learning Java programming from scratch

Training a Java developer from scratch on your own

Learning a Java developer from scratch with a mentor 

Why learning Java is cool and promising

Popularity ratings indicate that Java, developed in 1995 and gained popularity, does not give up its position. A stable second or third place in various evaluation methods suggests that it is worth learning Java — a Java programmer will not be left without a job in the next 10 years.

The authoritative TIOBE index named Java the language of 2015. The current state of affairs can be seen on the official website of the index

The largest hosting of IT projects, GitHub, also keeps statistics on the use of development tools

Java has been in the top for the last 6 years. The above is just JavaScript — it’s not the same thing — and Python.

What is the Java language?

Java was invented and developed in 1995 by programmers at Sun Microsystems. Then the whole company was bought up by Oracle, which owns the Java trademark – a cup of coffee. The development tools are free to use under the Open-Source License Agreement (GNU) GPL. 

Java — this is the pronunciation that the trademark owner insists on — is a further development of the C++ language, close to C#. Moreover, experts note the proximity of C# to Java, not C++. Java implements the concept of object-oriented programming. It differs from other languages in that it implements the Write Once Run Anywhere principle — write once, execute everywhere. This principle is usually shortened to WORA.

In order for the WORA principle to work, the text is translated into bytecode — a kind of intermediate representation. It is independent of the operating system. The Java Runtime Environment and/or Java virtual machines are responsible for interacting with the OS. 

JRE and JVM are available for common operating systems: Windows, Unix, Linux, macOS, Android — therefore, Java programs can be executed under any of the operating systems, without rewriting the text for a specific platform.

The intermediate code is passed to the JRE. Its task is to translate the code into a set of commands that is understandable to a particular operating system. 

On the one hand, platform independence is an advantage. On the other hand, a Java program running under an interpreter is 2 to 8 times slower than a C++application compiled and built for a specific OS. But versatility outweighs performance — that’s why Java is in the top development languages.

In addition, compiler programs have been developed that build a program for a specific OS — then it can no longer be executed in interpretation mode.

What is being developed in Java?

Java is used almost everywhere in one way or another. It is used for writing both client and server applications — front – and back-end. Java has developed frameworks, such as Spring, JSF, and Struts. Banking applications, websites, online stores, educational platforms, games — the same Minecraft, mobile applications on Android — you can write literally everything on Java. Another example: AliExpress uses Java.

Java’s position in corporate application development is particularly strong. Big Data systems are traditionally developed in Java.

Oracle provided statistics: Java applications were running on 3 billion (!) devices. This number is hard to believe, the scale is impressive. This means that Java developers are provided with well-paid jobs.

How much does a Java programmer earn?

According to our average of salary projections from PayScale, Indeed, and Glassdorr, the average Java programmer salary is $ 87,000 per year.

Indeed also cites a $5,000 cash bonus each year. Of course, every city is going to be different due to the location and the demand for computer programmers in different states.

It would seem that you need to learn Scala, Golang, Ruby, and so on. But the demand for Ruby or Scala is not as great as for Java. And it is much easier to take a job as a junior java developer. And already working as a programmer, pumping skills, you can learn Swift, Kotlin and other highly paid languages. Java is a base for learning any other OOP language.

How to start learning Java programming from scratch

To start learning Java, you don’t need some kind of database. The main thing is to have a desire and a computer with the Internet at hand.

There are several ways to learn to be a java programmer from scratch. According to the price / efficiency ratio, the top 5 methods are as follows:

  • Training in paid online video courses.
  • Training on paid courses in the form of a series of letters-lessons.
  • Self-study based on a textbook and Internet forums.
  • Training in free online video courses.
  • Training with a mentor.

Please note: paid courses without feedback are in the last positions of the rating. The offers of such courses look enticing: for just a couple of thousand rubles and 3 months — conditionally — you can learn how to program in Java. And go to hh.ru looking for a job as a junior java developer.

For 2,000 rubles, they usually give you either access to a video course, or offer online classes in a group — the crowd is in zoom, someone turned on the camera, someone forgot to turn off the sound, the chat is chaos. Good courses can’t cost two thousand.

But even in good courses, the problem of group classes remains. Someone learns the material faster, someone — slower. Someone has time to ask questions, someone does not. There is no question of an individual approach. All students write the same program and receive feedback in bulk.

Independent training on video courses and / or a textbook on the cost/efficiency ratio is higher in the rating. Logically, a novice java programmer does not bear the direct costs of training. But independent training will take a lot of time, and the result will be unpredictable.

Let’s talk about the first place in the rating below. In the meantime, let’s see where to start learning how to develop Java programs on your own.

Training a Java developer from scratch on your own

A developer starting to learn Java will need a JDK or Java Development Kit. You can download euj from the official Oracle website. This package already has a JRE, you do not need to download it separately. The version is not important, you can take either the latest one or the one for which the selected textbook is suitable.

Windows needs an easy modification after installing the JDK: the path to the bin folder where the executable files are located must be added to the PATH environment variable.  

After that, in any text editor, create a file MonitorOut.java. It is important to type all the characters in the same case. In the file we write (you can ctrl+c, ctrl+v): 

public class MonitorOut {

   public static void main(String []args) {

   System.out. println(“I’m learning Java with Solvery!”); 

   }

To run the program, run from the Windows command line

java MonitorOut.java

The program will display the line “I’m learning Java with Solvery!”.

The text shows that the Java syntax is very similar to C — the same declarations, the same curly brackets for limiting blocks.

Java syntax. Basic agreements

The language interpreter treats identifiers written in different registers as different.

The class name only starts with a capital letter, and so does every word in any composite identifier.

The method name starts with a lowercase letter only. There are no further restrictions.

The java text file has the same name as the class described in it, and the java extension.

Any java program begins with a description of the main procedure. All the main procedures of the classes are called the same — main().

Java syntax. Identifiers

To access memory locations, objects, their properties, and methods, the programmer assigns names to all of these entities. As a rule, the programmer uses meaningful identifiers, so as not to guess later what he meant by “abc” or “qwe”.

Name restrictions: The first character can be a letter of the English alphabet, an underscore, and a dollar sign. The rest of the characters are any. 

Java keywords cannot be used as identifiers — this will be an error. 

Java syntax. Variables and their declaration

A variable in classical programming is a memory area that stores a specific value and can be used in a program. For the convenience of accessing the variable, it is called. It’s the same in Java. But the variables are different. Local variables are only visible in the class, procedure, and method. A static one always refers to the same memory location. Dynamic is resolved at runtime.

The type of data that the variable will store is specified at the declaration stage. In Java, there are no default values for initializing variables, they must be specified explicitly.

Examples of variable declarations

int i = 1, j = 1, k = 1 // cycle counters, type integer, initialization value number 1

boolean sex = false / / boolean variable “gender”. false corresponds to female

Unfortunately, you can’t rewrite the entire Java tutorial into an article, and there’s no need to. On the Internet, everyone will find a manual, a guide, or libraries of sample programs for their tasks and initial training level. Java, which a programmer learns, may not be his first language.

Learning a java developer from scratch with a mentor

There is also a chance to master Java from scratch in a month or even less — individual lessons with a mentor. At Solvery, we call them mentors. 

The first step in learning java is to identify the area in which you would like to work in the future. Games, Data Science, e-commerce, front-end or back-end —almost everyone writes in Java. 

The second stage is the formulation of the goal. Just learning to write something from scratch in Java is not the goal. Learning how to develop a user interface in Android apps is the goal. To master the interaction with the Oracle database, to learn how to manipulate data, to give the user universal means of analysis — this is the goal. Creating a working presentation project that maximizes your skills as a candidate for the position of a junior developer in Java is also a goal.

The third stage is to identify a suitable mentor. Solvery collaborates with specialists employed in well-known software companies, active seniors, team leaders, and architects. There are even technical directors.

Java mentors on the page  — 35. Let’s clarify the request: we will additionally select one of the popular frameworks. Let it be Spring. Mentors who know Spring — 14. 

Each mentor on the page has a section “What can I help with”. The information should be carefully read. For example, we advise a novice java developer to contact Vladimir Baulin — he trains both novice specialists and helps with the design of the system and / or its elements, the development of technical thinking, preparation for a technical interview and writing Code-review.

If in doubt, the Solvery team will help you choose the best mentor. On the home page we make an application through the Pick Up a mentor service. The secret of success is in the correct wording of the request.

Sergey Kolesnikov, a developer at Tinkoff, is also a good potential mentor for a novice Java programmer. Sergey will help you learn Java from scratch and learn the basic tools and tricks of development, as well as pass the first interview. After all, the ultimate goal of learning any machine language is to use it in a job with a good salary.

There are several advantages of learning Java from scratch under the guidance of a mentor.

  1. The training program is based on:
  • entry-level student training;
  • request of a student to learn specific applications of java, for example, for games;
  • request of a student to develop a presentation java project for potential employers.

2. The schedule of classes, their duration, forms of control, the quality and quantity of feedback from the mentor are discussed by the mentor-student pair. The mentor offers, and the student has the right to either accept his offer or offer his own version. The last word in the choice is for the student.

3. Only the student determines when to finish classes with the mentor. The student pays for the time spent by the mentor, and not in advance, as in the courses.

4. The student does not choose a mentor “blindly”. He has a free lesson — 15 minutes, in which a bunch of mentor-student understands whether their interaction will be effective.

Invest in your future. Spend your money wisely.

Subscribe
Notify of
guest
0 комментариев
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x