JavaRush /Java Blog /Random EN /What are the tasks in Java

What are the tasks in Java

Published in the Random EN group
When a person begins to learn programming on their own or in online courses, it is very important to designate a “field of activity” and systematize everything. In this article, we present such a systematization - Java tasks for beginners, with an indication of how fully a particular type is presented in the online CodeGym programming course and useful links. What are the tasks in Java - 1

Language Syntax Tasks

The foundation of the basics, the very first Java programming tasks for beginners - from "Hello World" to loops and arrays. There are a lot of them on CodeGym: they are especially densely concentrated in the Java Syntax quest on the first six levels. It is unlikely that you need to look for any additional sources for their assimilation - there are quite enough of them. In addition, when solving any more complex problems, you automatically repeat the syntax. But if you suddenly need it, any Java problem book for beginners contains such exercises. Only, there will be no instant check, as in CodeGym, in these problem books.

Collection tasks

Collections are the first "serious" topic that a novice programmer encounters while studying. Java tasks for beginners, dedicated to collections, are also widely represented on CodeGym - at the seventh and eighth levels of the Java Syntax quest. Here the student will hear about the Java Collections Framework for the first time, work with the Set, List and Map interfaces and some of their implementations. However, at this stage, you will only get acquainted with this useful tool and simple tasks in Java. A more thorough study of collections will occur during the completion of the Java Collections quest . You can see how important this object is, since a whole quest was named after it!.

Tasks for exceptions

A special mechanism is responsible for working with abnormal situations in Java, which greatly simplifies the "catching" of errors in programs. But in order to fully use it, you need to figure out how exception handling is arranged in Java. There are a lot of such tasks on CodeGym, and they are even found in the first Java Syntax quest.
What are the tasks in Java - 2

Type casting problems

Of course, this group can be attributed to basic tasks on syntax. Nevertheless, in our humble opinion, such problems are often underestimated, and beginners swim in them. Therefore, let's move away from templates: we study tasks in Java for beginners on the topic “Primitive type casting” not at the very beginning, as they often do, but a little later - at the end of the first Java Syntax quest. And then we will learn how to cast non-primitive types (objects) by studying OOP in the Java Core quest . There are enough such tasks for CodeGym, you don't have to look for anything else.

Tasks for understanding OOP

OOP is not the most difficult topic, but extremely important. In addition, there are a lot of subtleties hidden in it, on which interviewers like to catch future “juniors”. The CodeGym course contains practical programming tasks for beginners that will help you understand the object-oriented approach. However, to truly understand OOP, we recommend reading literature on the topic (for example, Kay Horstmann, Gary Cornell's The Professional's Library, McLaughlin's Object-Oriented Analysis and Design, or other books ) .

Tasks for I/O streams

We start using I / O streams long before we deal with them - this is Java, baby, and explaining System.out to a green newbie, and, moreover, System.in - is difficult, and not necessary at the first stage. But during the passage of the Java Core quest , knowledge is just enough to understand this somewhat confusing topic, and we are talking not only about console input / output, but also about working with the file system. The main thing is not to skip these tasks (there are quite a lot of them on CodeGym), and deal with the theory consistently.

Puzzle

By "puzzles" we mean tasks of increased complexity that require not so much knowledge as the ability to apply them in a non-standard way. These are typical tasks for Java Junior - they are very popular in interviews, but in real work, puzzles in this sense are not very common. Therefore, CodeGym has them, but not very many (usually in Captain Bobrov's classes).
What are the tasks in Java - 3
Where can you find puzzles?

Algorithms and data structures

As for algorithms and data structures, there is a constant debate about how much a future programmer needs them. Once again, we will answer: for the formation of thinking - they are needed, directly for work - rarely. Because for Java, and other languages, too, libraries have already been written with implementations of all known algorithms for sorting, searching, and others. Nevertheless, it is very useful to create your own implementations of algorithms, as well as to form an understanding of their complexity. Especially for people who studied mathematics only at school. In principle, these tasks are interspersed with puzzles, with the only difference being that they are all described and solved many times in the network. You don't even need a validator to validate. Choose any course, such as Princeton University , their California peers, or Stepic. By the way, in the course CS50 , the translation of which we have placed on CodeGym, several important algorithms and data structures are disassembled. We strongly recommend that you watch videos of levels 2-5 and implement the tasks discussed in them in Java. Tasks for graphs: Tasks on data structures:

Multithreading

Anyone can write a program that prints "Hello World"... And if using the Java Thread API, so that the famous phrase is printed from an additional thread? What if it prints "Hello world" five times from five different threads, and so that the lines do not interleave? .. Multithreading is the real "strength test" when learning Java Core. This very difficult topic is devoted to a whole quest on CodeGym, which is called Java Multithreading , and it contains a large number of tasks so that the student can feel the “pain and beauty” of parallel processes. More often than not, students' first "real" projects contain multithreading to a greater or lesser extent. For example, simple games.
What are the tasks in Java - 4

The task of multithreading

Five silent philosophers sit at a round table. In front of each of them is a plate of spaghetti. Forks are on the table to the left and right of each philosopher (between them). A philosopher can either eat or think. Moreover, he can eat only if he holds two forks - taken to the right and left of him. "Take the fork" and "put the fork" are separate actions that are performed sequentially.

Tasks on Generics

Generalization is the very essence of automation, that is, in a sense, programming. So the topic of generics or generics in Java should also not be left without attention. CodeGym has tasks for generic programming (mainly in the Java Collections quest, starting from level 5). Where can I find useful exercises and materials on generics:

Tasks for design patterns

A novice programmer at some stage (about 2/3 of the CodeGym course) needs to start looking closely at the rules of good taste in programming. We are talking about the correct design of the code (which is easier) and design patterns (which is more difficult). CodeGym has such tasks. Need additional - can be found, for example, in the book (part 4) " Java. Programming methods » Blinov and Romanchik. Or think about how you can bring already solved problems under the template.

Unit testing

An important skill of any programmer, which is often mistakenly attributed exclusively to testers, is writing unit (or Unit) tests for your own code. CodeGym has a few unit test tasks, but you really shouldn't bother looking for new ones. Once you've figured out how to write tests, get in the habit of covering your code (in your own projects, in learning tasks) with unit tests. This is much more useful than doing checks with console output, which is what software students tend to suffer from. In addition, very often the first thing that "juniors" in companies are trusted to do is writing Unit tests for someone else's code.

Tasks for regular expressions

This is a simple topic, in which almost none of the beginners understands, because it is unusual and lazy. In fact, it's worth spending a few days researching the topic, sorting out the "regulars" and gaining an advantage over those who didn't. This is also useful because they are almost independent of the programming language: learn it once, you can use it everywhere. There are no tasks on CodeGym that are devoted to regular expressions, although some can be solved with their help. So here are additional resources to understand the topic:
What are the tasks in Java - 5

Java tasks with a trick

This category includes tricky tasks that are most often not directly related to the real work of the programmer. They are mainly found at interviews, they are used to understand the depth of understanding / knowledge of a particular technology by a candidate or to test his attentiveness. If you need such tasks, Google the query "Java interview tasks" or something like that. Most likely, you will find a lot of selections, as well as questions and answers on various forums. It is useful to understand them, but is it worth spending too much time on them? Kay Horstmann once spoke well about such tasks in his article for InformIT, translationwhich we published in January. To briefly retell his thought - there are real-world tasks, and there is a parallel universe - "Tasks for interviews."

Tasks for lambda expressions

Support for lambda expressions appeared in Java 8, but still not all programmers willingly use them. However, today the concept of "tasks for Java Junior" includes the manipulation of lambda expressions, so we recommend that you familiarize yourself with them, for example, from the very accessible article Popular about lambda expressions in Java. With examples and tasks .

Network tasks

Serializing to JSON, RMI, HttpUrlConnection, socket… is not exactly a programming task for beginners anymore. They require solid knowledge, and are a kind of bridge to their own projects, internships and work. At the senior levels of CodeGym (Java Collections quest) there are quite a few exercises to master these technologies and approaches, but everything will become much clearer in the process of completing an online internship.
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION