When a person begins to study programming on his own or in online courses, it is very important to define the “field of activity” and systematize everything. In this article we present such a systematization - Java tasks for beginners, indicating how fully a particular type is presented in the online course for learning programming JavaRush and useful links.
Where can you find puzzles:
Language syntax problems
The basics, the very first Java programming tasks for beginners - from “Hello World” to loops and arrays. There are a lot of them on JavaRush: they are especially densely concentrated in the Java Syntax quest at the first six levels. It is unlikely that you need to look for any additional sources to assimilate them - there are quite enough of them here. In addition, when solving any more complex problems, you automatically repeat the syntax. But if you suddenly need them, any Java problem book for beginners contains similar exercises. Only there will be no instant check, like in JavaRush, in these problem books.Collection tasks
Collections are the first “serious” topic that a newbie programmer encounters during his studies. Java problems for beginners, dedicated to collections, are also widely represented on JavaRush - 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 Java tasks. A more thorough study of collections will occur during the quest Java Collections . You see how important this object is, since an entire quest was named after it!Exception problems
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 understand how exception handling works in Java. There are a lot of such tasks in JavaRush, and they are found even in the first Java Syntax quest.Type conversion problems
Of course, this group can be classified as basic syntax tasks. However, in our humble opinion, such tasks are often underestimated, and beginners flounder at them. Therefore, let’s move away from templates: we study Java tasks for beginners on the topic “Conversion of primitive types” not at the very beginning, as is often done, 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 plenty of such tasks in JavaRush; you don’t have to look for anything additional.Tasks for understanding OOP
OOP is not the most difficult topic, but it is extremely important. In addition, it contains a lot of subtleties that interviewers like to use to catch future “juniors.” The JavaRush course contains practical programming problems 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 Professional's Library, McLaughlin's Object-Oriented Analysis and Design, or other books ).Tasks on I/O threads
We start using I/O streams long before we understand them - this is Java, baby, and explaining System.out, and, moreover, System.in to a green beginner, is difficult, and not necessary at the first stage. But during 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 in JavaRush), and consistently understand the theory.Puzzles
By “puzzles” we mean tasks of increased complexity that require not so much knowledge as the ability to apply it 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. That's why there are them at JavaRush, but not very many (usually in Captain Bobrov's classes).- http://acm.timus.ru/problemset.aspx?space=1&tag=tricky
- https://tproger.ru/category/problems/
- https://www.codechef.com/
- https://www.codewars.com/?language=java
Algorithms and data structures
There are constant debates about algorithms and data structures about how much a future programmer needs them. Once again we will answer: for the development 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 sorting, search and other algorithms. However, creating your own implementations of algorithms is very useful, as is developing an understanding of their complexity. Especially for people who only studied mathematics at school. In principle, these tasks are interspersed with puzzles, the only difference being that they are all described and solved online many times. You don't even need a validator for verification. Choose any course, for example, from Princeton University , their colleagues from California or Stepic . By the way, in the course CS50 , the translation of which we placed on JavaRush, several important algorithms and data structures are discussed. We strongly recommend watching videos of levels 2-5 and implementing the tasks in Java. Graph problems: Data structure tasks:Multithreading
Anyone can write a program that prints "Hello World"... How about using the Java Thread API so that the famous phrase is printed from an additional thread? And so that it prints “Hello world” five times from five different threads, and so that the lines do not alternate?.. Multithreading is a real “strength test” while learning Java Core. An entire quest on JavaRush is dedicated to this very difficult topic, 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 involve multithreading to a greater or lesser extent. For example, simple games.
Multithreading problem Five silent philosophers sit at a round table. In front of each of them is a plate of spaghetti. Forks lie 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 - one taken to the right and to the left of him. “Pick up a fork” and “put down a 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 generalizations or generics in Java should also not be ignored. JavaRush has general programming tasks (mostly in the Java Collections quest, starting at level 5). Where you can find useful exercises and materials on generics:- https://docs.oracle.com/javase/tutorial/java/generics/QandE/generics-questions.html
- https://www.geeksforgeeks.org/generics-in-java/
- http://www.angelikalanger.com/GenericsFAQ/FAQSections/ProgrammingIdioms.html
- Book "Effective Java" by Joshua Bloch
Design Patterns Tasks
At some stage (about 2/3 of the JavaRush course), a novice programmer needs to start looking closely at the rules of good manners in programming. We are talking about correct code formatting (which is easier) and design patterns (which is more difficult). JavaRush has such tasks. Additional ones are needed - they can be found, for example, in the book (part 4) “ Java. Programming methods » Blinov and Romanchik. Or think about how you can fit already solved problems into a 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. JavaRush has a few Unit Test tasks, but you really shouldn’t bother looking for new ones. Once you figure out how to write tests, form the habit of covering your code (in your own projects, in educational tasks) with Unit tests. This is much more useful than doing checks using console output, which is what student programmers tend to suffer from. In addition, very often the first thing that companies entrust “juniors” to do is writing Unit tests for someone else’s code.- Unit testing for dummies - a useful article from Habr, after which it will become clear why unit testing is needed
- Junit - Java for testers - video tutorial by Yuri Tkach
Regular expression problems
This is a simple topic that almost no beginner understands, because it is unusual and laziness. In fact, it is worth spending a few days studying the topic, understanding the “regulars” and gaining an advantage over those who have not done so. This is also useful because they are almost independent of the programming language: learn it once, you can use it everywhere. There are no problems in JavaRush that focus on regular expressions, although some can be solved using them. So here are some additional resources for understanding the topic:- Regular expressions in Java - translation of an article by Jeff Friesen
- Testing regular expressions - a resource where you can test regular expressions online
- Mike Fitzgerald Regular Expressions is a short and simple tutorial.
GO TO FULL VERSION