Java programming language. Lessons for beginners from hyperskill


Intro to programming. Computer programming


Simply put, computer programming is a way to make computers do different tasks. It is a process of writing a set of instructions (also known as code) that a machine can understand and making the machine follow them. The end goal might be to solve a mathematical equation, automate a boring task, or create a web page, a piece of software, a mobile app, or a whole game.

Computer programming requires technical skills and creative thinking. Some call it science, some call it art.

To have a full picture of what computer programming is, we need to highlight two points in the definition: "make computers do tasks" and "write a set of instructions that a machine can understand". Let’s talk about the instructions first.

What are programming languages?

What are programming languages

So, how can you write this set of instructions? Think about a computer as your foreign friend. They don’t understand any language except their native one and need very simple and clear descriptions of every action you want them to perform. Why that last part? Well, um, because they are your foreign time-traveling friend. See, now this metaphor is taking me places. Your computer is your foreign time-traveling friend from, err, the 12th century. That’s why it knows nothing about anything.

Following this logic, you can’t just tell your computer to "call Steve from accounting". You need to describe every single action that this order includes:

  1. Pick up the phone
  2. Push the button to turn on the screen
  3. Swipe the phone to unlock it
  4. Open Contacts
  5. Enter “Steve from accounting” into the search
  6. Open Steve’s contact
  7. Push the Call button

And what was that about its native language? Computers don’t understand English or French, but they do understand programming languages, such as C, Python, or Java. It’s a bit of a simplification because computers don’t actually understand them — they understand only machine code. Software developers use compilers to translate source code that they write to the machine code, but we don’t want to overload you with all this information.

There are more than a thousand programming languages. The old ones keep evolving and new ones keep appearing. Below you can see the most popular programming languages in Aug 2023 according to PYPL Popularity of Programming Language. This list is rapidly changing, so for more relevant data you should visit their site.

Worldwide, Aug 2023 compared to a year ago:

Rank Language Share Trend
1 Python 28.04 +0.3%
2 Java 15.78 -1.3%
3 JavaScript 9.27 -0.2%
4 C# 6.77 -0.2%
5 C/C++ 6.59 +0.4%
6 PHP 5.01 -0.4%
7 R 4.35 +0.0
8 TypeScript 3.09 +0.3%
9 Swift 2.54 +0.5%
10 Objective-C 2.15 +0.1%
11 Rust 2.14 +0.5%
12 Go 1.93 -0.2%
13 Kotlin 1.77 -0.0%
14 Matlab 1.63 +0.1%
15 Ada 1.08 +0.3%
16 Ruby 1.06 -0.1%

Every computer language has its own goals and merits, and some languages are better suited for specific applications and tasks. Some languages are more difficult, others less so. Some are simple and popular, others are nuanced and niche. An important thing to remember is that just like English, French, or any other language, programming languages have parts, constructions, and concepts that are shared among all of them. So, learning another computer language will be as difficult (or as easy) as learning a foreign one. If you understand the sentence “I can write” in English, you won’t have much trouble grasping the concept of "ich kann schreiben" in German.

How to choose a computer language?

When choosing a language, you should ask yourself what sort of work you would like to do. And this brings us to the “make computers do tasks” part of the question. Think about why you want to learn to code. Do you want to become a game developer? Do you want to create mobile applications? Do you want to make websites? Or maybe you need programming to automate work with scientific and statistical data?

Every field comes with a set number of languages. Web development, for example, differentiates between two main types of programming: front-end development and back-end development.

The front-end of a website is the part that users can see. Fonts, colors, sliders, panels, menus are created with a combination of HTML, CSS, and JavaScript. Think about it as the interior design of a house. In this sense, back-end development is similar to building a house. It includes a server, an application, and a database. The back-end developer’s work consists of building and maintaining these components. A lot of different languages can be used here, e.g. PHP, Python, Java, etc.

So, it’s not really about choosing a language. It’s more about choosing a field. If you want to create Android apps, choose Kotlin; for iOS apps choose Swift, and if you want to develop games, learn C or C++. And if your answer to the question "why" is "to make a lot of money, idk", consider the most used programming languages and start there.

What should I expect?

A lot of it feels like a routine, and when it doesn’t, it’s more like hitting your head against a brick wall in the middle of a desert. Yet so many people find great joy in it. Programming isn’t just about languages and syntax and compilers, it’s the whole logical thinking process that makes it so rewarding. There is never the "best" solution to the problem. You always want to make it faster, better, and bigger.

Programming teaches you how to think differently. It teaches you to think about how things work and why they work this or that way. The coding process feels like a puzzle that you’re constantly trying to solve.

Programming teaches you patience. It’s one of the most stressful and aggravating things you can ever do. A lot of people get frustrated and give up learning when their code doesn’t work for the first time. But the truth is, this is a normal process. Programmers with years of experience still have moments when their code doesn’t work, and they have no idea why. But patience and perseverance are the key traits that got them to where they are now.

The bottom line is that programming is a skill. And like with every skill, you need to put in some time and effort to see the results. Hyperskill will help you learn programming skills - complete projects to gain experience in popular languages. Our platform provides a curriculum that will take you step by step through new information. Good luck!

You can also view Lesson on

Practical tasks and answers

Tasks and answer options are given. The correct option is highlighted in blue color.

№1. True programmer

Question: What do you absolutely need to become a programmer?

Select one option from the list:

  • To buy a very expensive computer
  • To hack a website
  • To know at least three foreign languages
  • To study and practice a lot ✔

№2. Owner of Java

Question: Who is the owner of Java?

Select one option from the list:

  • Tencent
  • Oracle Corporation ✔
  • Amazon
  • Microsoft

№3. Applications of Java

Question: Select the correct answer about what Java can be used for.

Select one or more options from the list:

  • Medical applications ✔
  • Financial services industry ✔
  • Android smartphones ✔
  • Computer games ✔