[9/13] Java Foundations Certification: Defining Classes

Build a strong foundation of knowledge in Java programming! In this lesson we take a closer look at defining classes.

In the current lesson, you will learn the foundations of Object-Oriented Programming (OOP).

Svetlin Nakov will go over the topics of defining simple classes, conventions, and best practices in doing so, creating objects of these classes, object references, and what is the difference between an object and a class.

Later on in the lesson, you will become familiar with data fields and access modifiers, and of course – constructors, getters, and setters, which are the building blocks of every class. By the end of the lesson, you will also have a good understanding of the term static, which you’ve surely encountered multiple times so far.

You will find many helpful examples and exercises, so make sure to practice what you’ve learned!

As always, we advise you to pause the video right before the solving part of each problem and try to do the exercises on your own first. Then, if you have difficulties, just watch the provided solutions in the video. 

*The exercise descriptions are to be found in the PDF document at the end of this post.

Lesson Topics

This video covers the following topics:

1. Defining Simple Classes

  • Creating objects
  • Using classes

2. Fields

  • Class data
  • Access modifiers

3. Methods

  • Getters
  • Setters
  • ToString()

4. Constructors

  • The keyword this

5. Static Members

  • Static methods and fields

Practical Exercises

Watch the video and solve the problemsTo better understand the material, do the coding exercises and implement the knowledge you acquired. Writing code is the only way to master the skill of code.

Submit your code in the SoftUni Judge System:

Exercises: Problem Description

Lesson Slides

Leave a Comment

Recent Posts

About SoftUni

SoftUni provides high-quality education, profession and job to people who want to learn coding.

The SoftUni Global “Learn to Code” Community supports learners with free learning resources, mentorship and community help.

Tags

Categories

Scroll to Top