CodeGym
Promotion
CodeGym University
Learning
Course
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme

Lessons

  • Reviews
  • About us
Start
Start learning
Start learning now
  • Quest map
  • Lessons
All quests Java Syntax Java Core Java Multithreading Java Collections JSP & Servlets
All levels Level 0 Level 1 Level 2 Level 3 Level 4 Level 5 Level 6 Level 7 Level 8 Level 9 Level 10 Level 11 Level 12 Level 13 Level 14 Level 15 Level 16 Level 17 Level 18 Level 19 Level 20 Level 21 Level 22 Level 23 Level 24 Level 25 Level 26 Level 27 Level 28
  • A success story. How to use programming to advance in any field

    New Java Syntax
    Level 15, Lesson 0
    You can learn to program and not become a programmer, but instead apply your new skill to advance your current career Sergey, a Moscow resident, shared his success story with CodeGym students. He used the course to study for 3.5 years, but still isn't working as a developer. What went wrong? Or perhaps everything...
    Available
  • Stack trace

    New Java Syntax
    Level 15, Lesson 1
    A stack obeys the "first in, last out" principle. In Java, the StackTrace rule says: Remember that the last function called is the first function to end. That is, if function A calls function B, which calls function C, which calls function D, then returning from function B requires that we first return from function C, which requires that we first return from function D.
    Available
  • Practice displaying the stack trace

    New Java Syntax
    Level 15, Lesson 2
    A stack is like a stack of plates at a cafeteria. If for some reason the third plate from the top catches your fancy, you'll have to remove the top two to get to it. The Java call stack is a special collection that the virtual machine uses to record all function calls. We'll learn how to get the plate we want by completing some tasks involving StackTrace.
    Available
  • Introducing exceptions

    New Java Syntax
    Level 15, Lesson 3
    Previously, when an error occurred in a method, the program would terminate. Now the Java machine creates a special object (an exception), which stores information about the error. The program exits the current method, then exits the method that called that method, and so on until it reaches the main method. For the program to continue working, the exception must be "caught".
    Available
  • Exception types

    New Java Syntax
    Level 15, Lesson 4
    In Java, exceptions are divided into two types: checked and unchecked, i.e. exceptions that must be caught and exceptions that do not have to be caught. By default, all exceptions must be caught. Now we'll try to understand how to work with exceptions thrown by the Java machine.
    Available
  • How exceptions work

    New Java Syntax
    Level 15, Lesson 5
    Exceptions are a very elegant and convenient mechanism for dealing with errors. But to work with them, you must understand some things about Java programming, and you need to get used to how the call stack unwinds. In this lesson, let's look at an example of how to create, throw, and catch exceptions.
    Available
  • Catch me if you can

    New Java Syntax
    Level 15, Lesson 6
    By Level 9, CodeGym students have already completed dozens of tasks. But not without some mistakes, right? Previously, the program would terminate if an error occurred. Now Java has exceptions and a special "trap" for exceptions: the try-catch block. Let's complete several tasks involving exceptions while working with numbers, strings, arrays, and collections.
    Available
  • How multi-catch works

    New Java Syntax
    Level 15, Lesson 7
    The catch statement, which is used to catch exceptions, can catch multiple exceptions. What does using a single multi-catch block do for you? It makes code simpler and more understandable, eliminates repetition, and is mood-enhancing (this last property is an optional consequence of using multi-catch).
    Available
  • Multiple tasks about multi-catch

    New Java Syntax
    Level 15, Lesson 8
    How multi-catch works? If an exception occurs in a try block, execution of the program jumps to the first catch. If the type specified inside the catch statement matches the exception type, then the code inside the {} block starts executing. Otherwise, execution moves to the next catch and the check is repeated. Now let's practice to help reinforce this concept.
    Available
  • Additional lessons for Level

    New Java Syntax
    Level 15, Lesson 9
    In this level, you learned how and why exceptions occur. This is a very important topic for your future work as a programmer. We are sure you won't be hurt by seeing a few more real-world examples and a couple of additional articles. Catching and handling exceptions This interesting article will help...
    Available
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Game Projects
  • Java Syntax
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
Company
  • About us
  • Contacts
  • Reviews
  • Press Room
  • CodeGym for EDU
  • FAQ
  • Support
CodeGym CodeGym is an online course for learning Java programming from scratch. This course is a perfect way to master Java for beginners. It contains 1200+ tasks with instant verification and an essential scope of Java fundamentals theory. To help you succeed in education, we’ve implemented a set of motivational features: quizzes, coding projects, content about efficient learning and Java developer’s career.
Follow us
Interface language
Programmers Are Made, Not Born © 2022 CodeGym
Download App
  • Google Play
  • Huawei AppGallery
  • App Store
MastercardVisa
Programmers Are Made, Not Born © 2022 CodeGym
This website uses cookies to provide you with personalized service. By using this website, you agree to our use of cookies. If you require more details, please read our Terms and Policy.