CodeGym/Java Blog/Java Developer/What sorts of Java tasks do you have?
CodeGym
Level 41

What sorts of Java tasks do you have?

Published in the Java Developer group
members
When someone starts learning how to program, whether alone or through online courses, it's very important to emphasize some domain and structure everything. In this article, we present our structure — Java tasks for beginners, with an indication how much any particular type of task is represented in the CodeGym online programming course, along with useful links. What sorts of Java tasks do you have? - 1

Practice with language syntax

These are the very first Java programming tasks for beginners — the foundation — from "Hello, World" to loops and arrays. CodeGym has lots of them: they are especially concentrated in the first six levels of the Java Syntax quest. You're unlikely to need to look for more of them elsewhere. We certainly have enough to master them. What's more, when you any more difficult task, you automatically review the syntax. But if you suddenly find yourself in need, any Java textbook for beginners contains similar problems. But unlike CodeGym, these exercise books won't have instant task verification.

Practice with collections

Collections are the first "serious" topic that newbie programmers encounter in their studies. Beginner tasks devoted to Java collections are also well represented on CodeGym — on the seventh and eighth levels of the Java Syntax quest. This is where the student will first hear about the Java Collections Framework, and will work a little with the Set, List, and Map interfaces along with some of their implementations. However, at this stage you'll get only an introduction to this useful tool and simple Java tasks. You'll study collections more thoroughly during the Java Collections quest. You can see how important this subject is — an entire quest has been named after it!

Practice with exceptions

Java provides a special mechanism for handling exceptional situations, significantly simplifying the process of "catching" application errors. But to make the most of it, you need to figure out how exception handling works in Java. CodeGym has heaps of such tasks. You'll even encounter them in the first quest — Java Syntax. What sorts of Java tasks do you have? - 2

Practice with type casting

This group of tasks could, of course, be classified as basic tasks on syntax. However, in our humble opinion, people often under-appreciate such tasks, and newbies flounder in them. That's why we break the mold: We don't study primitive type conversion tasks at the very beginning as others often do. Instead, we tackle them a little later — at the end of the Java Syntax quest. And then we'll learn to cast non-primitive types (objects) when we study OOP in the Java Core quest. CodeGym has enough of these tasks. You don't need to look any further.

Practice with OOP

OOP is not the most difficult topic, but it's extremely important. And it hides a lot of subtleties that interviewers like to use to catch would-be junior developers. The CodeGym course contains practical programming tasks for beginners to help you understand the object-oriented philosophy. But to really understand OOP, we recommend that you read related literature (for example, Cay Horstmann's and Gary Cornell's "Core Java", McLaughlin's "Object-Oriented Analysis and Design", or other books).

Practice with input/output streams

We start using I/O streams long before we understand them. This is Java, my young grasshopper! Explaining System.out, let alone System.in, is difficult and unnecessary when you first begin. But as you work through the Java Core quest, you know just enough to understand this somewhat confusing topic, and we talk about not only console I/O, but also working with the file system. The main thing is to not skip these tasks (CodeGym has quite a lot) and to consistently delve into the theory.

Brainteasers

By "brainteasers", we mean tasks of increased complexity that aren't so much about knowledge as about the ability to apply what you know in unconventional ways. These are common tasks for a junior Java developer. Companies are very fond of asking them during interviews, but in real work, such brainteasers are not encountered very often. So CodeGym has some, but not very many (you'll usually see these in lessons by Captain Squirrels). What sorts of Java tasks do you have? - 3Where can I find brainteasers?

Algorithms and data structures

As for algorithms and data structures, there's constant debate about how much a future programmer needs them. We'll answer once again: they are essential for establishing the right mindset, but they are rarely directly required for work. This is because Java, as well as other programming languages, have libraries with implementations of every imaginable algorithm for sorting, searching, and more. Still, writing your own implementation of an algorithm can be very helpful and can give you an idea of its complexity. Especially for people who studied math only in high school. Basically, these tasks can be interchanged with brainteasers with the sole difference that they have all been described and solved repeatedly online. You don't even need a validator tool. Choose any course from, say, Princeton University or a college in California. Practice with data structures:

Multithreading

Anyone can write a "Hello, World!" program. But how about using the Java Thread API to display the famous phrase from a separate thread? Or how about displaying "Hello, World!" five times from five different threads without mixing up the strings? Multithreading will be the best "test of your strength" as you study Java Core. An entire CodeGym quest, called Java Multithreading, is dedicated to this topic, which is far from easy. It contains a huge number of tasks to allow students to feel the "pain and beauty" of parallel processing. Students' first "real" projects usually contain some level of multithreading. For example, simple games. What sorts of Java tasks do you have? - 4

Practice with multithreading

Five silent philosophers sit at a round table. A plate of spaghetti is in front of each of them. There are forks on the table between each philosopher (one to the left and one to the right). Each philosopher can either eat or think deep thoughts. But he or she can eat only if holding two forks, i.e. by picking up the one on the left and the one on the right. "Pick up fork" and "put down fork" are distinct actions that are performed sequentially.

Practice with generics

Generalization is the very essence of automation, so in some sense it is the essence of programming. Accordingly, we cannot ignore the topic of generics in Java. CodeGym has programming tasks involving generics (mainly in the Java Collections quest, starting at Level 5). Where can I find useful exercises and materials on generics?

Practice with design patterns

At some point (two-thirds of the way through the CodeGym course), beginner programmers must start looking at the rules for achieving good form in programming. We're talking about proper code formatting (simpler) and design patterns (more difficult). CodeGym has tasks for this. You'll need more and you can find them in "Head First Design Patterns" by Elisabeth Freeman and Kathy Sierra. Or you can think about how you could apply design patterns to previously solved tasks.

Unit testing

An important skill for any programmer, often mistakenly attributed solely to testers, is the ability to write unit tests for his or her own code. CodeGym has a few tasks related to unit tests, but you don't really need to bother searching for more. When you understand out how to write unit tests, make it a habit to cover your code (in own projects, in your studies) with them. This is much more helpful than performing checks with console output, a practice that usually afflicts student programmers. In addition, very often the first thing that new junior developers are tasked with at companies is to write unit tests for someone else's code.

Practice with regular expressions

This is a simple topic that almost no beginners understand, because it is unfamiliar and they're lazy. It really is worthwhile to spend a few days studying the topic, get to the bottom of "regex", and gain an advantage over those who haven't done so. This is also helpful because regular expressions are nearly language-independent: if you learn them once, you'll be able to use them everywhere. CodeGym doesn't have any tasks dedicated to regular expressions, though some can be solved with their help. Here are additional resources for understanding this topic:
  • regex101.com — a website where you can check regular expressions online
  • Mike Fitzgerald's "Introducing Regular Expressions" — a concise and simple primer.
What sorts of Java tasks do you have? - 5

Practice with trick questions about Java

This category includes tricky tasks usually not directly related to real programming work. They are mainly encountered during interviews, where they are used to understand a candidate's depth of understanding/knowledge of a particular technology or to test his or her attention to detail. If you need tasks like this, search for "Java interview questions" or something similar on Google. You'll probably find a bunch of problem sets, as well as questions and answers in all sorts of forums. It's good to understand them, but is it worthwhile to spend excessive amounts of time on them? In an article for InformIT, Cay Horstmann once made a good point about such tasks. To briefly paraphrase his thoughts, there are real-world tasks and there is the parallel universe of "interview questions".

Practice with lambda expressions

Support for lambda expressions appeared in Java 8, but they are not yet used with enthusiasm by all programmers. Still, today the concept of "tasks for junior Java developers" includes operations with lambda expressions, so we recommend getting acquainted with them.

Practice working with networks

Serialization into JSON, RMI, HttpUrlConnection, sockets... these aren't exactly programming topics for beginners. They require solid skills and are something like a bridge to your own projects, internships, and employment. CodeGym's advanced levels (the Java Collections quest) have a lot of exercises to help you master these strategies and technologies, but everything will become much clearer as you complete an online internship.
Comments
  • Popular
  • New
  • Old
You must be signed in to leave a comment
This page doesn't have any comments yet