"Greetings, Amigo! As I understand it, you attended my lesson on the physical foundations of the space-time curvature of pipes? No? Well, why not? Do you need additional materials about the fifth level? Well, here you go."
Why do we need constructors?
"Have you already asked yourself this question? And did you find the answer? Are you sure the answer is correct? Let's check! How do you create a default cat without any distinguishing features? How do you create the same cat, but with a certain color fur and tone of voice? You don't know? Here's an excellent article on the very basics of constructors in Java. Read and be enlightened!"
Base class constructors
"You're currently starting to dig into constructors in Java. So, one interesting article I found in our ship's storage bins won't hurt you. It's about base class constructors, and is designed just for your level. You will learn (or review) what superclasses and subclasses are, the order that constructors are called in, and the order that fields are initialized in."
"I don't have a lot of articles for you today, but the topic is very important. So immerse yourself in it. And if you want to read something else about constructors, 'Head First Java' will save the day! Or, Cay Horstmann's 'Core Java' is also an excellent textbook. Think it's too early to read it, since you're not a professional yet? Think again. Professionals aren't born, remember?"
Getters and setters
"Once upon a time, you didn't know what encapsulation is and why it is needed. And maybe even now you don't feel confident when we talk about hiding a class's data and helper methods (getters and setters). If so, then please be so kind as to review a very useful lesson, which will most likely strengthen your understanding of encapsulation."
"Beginners find this beast very unusual. And by and large you can do without it, but the ternary operator does cut down on code so well! So, if you don't already know about this replacement for the if-else construct, I recommend that you familiarize yourself with it and begin to integrate it into your code."
"And I've also decided to recommend a book for future reading. Since the lesson on the ternary operator is about code readability, remember this book title—'Clean code'—and its author—Robert Martin."
"This book brings together best practices and recommendations for programmers, which will help you write code that is not only functional, but also easily readable."
GO TO FULL VERSION