Start learning now
You've reached Level 24
You've reached Level 24
Marker interfaces and deep copies
"Hi, Amigo!" "Hi, Bilaabo!" "Today I'll tell you about marker interfaces." "Marker interfaces are interfaces without methods. When a class implements such an interface, we say that it is marked by it." "Examples of these interfaces include: Cloneable, Serializable, Remote." "The Serializable interface is used to mark classes that support serialization, indicating that instances of these classes can be ..."
Practice using marker interfaces
"Bilaabo has tasks ready for you." "You are a very talented student, Amigo." "I hope that my tasks will help you become simply unparalleled ..."
Inheriting nested classes
"Hi, Amigo!" "Hi, Kim." "I want to tell you about inheriting static and non-static nested classes." "I'm ready." "There really aren't any issues with inheriting static nested classes. They are inherited just like regular classes ..."
Practice inheriting nested classes
"Hi, Amigo!" "Here's a spiffy set of tasks for you. I hope you like them ..."
Local classes: classes inside methods
"Hi, Amigo!" "Another little tiny topic is local classes." "As you have seen, you can create classes not only in separate files, but also inside other classes. But that's not all. Classes can also be created within methods. These classes are called local classes. They work like ordinary inner classes, but they can be used within the methods they are declared in." "Look at the screen ..."
Practice using local classes
"Hi, Amigo!" "Here are a few more tasks. I hope you enjoy them ..."
What really happens (i.e. what the compiler generates from classes)
"Hi, Amigo! Here's some more information for you." "I already told you that the compiler actually converts all anonymous classes into ordinary inner classes." "Yep. I even remember that their names are numbers: 1, 2, 3, etc." "Exactly. But there's another nuance here." "If a class is declared inside a method and uses any of its variables, then references to those variables will be added to the generated class ..."
Constructors/variables of anonymous inner classes, and final
"Hi, Amigo!" "As you already know, anonymous inner classes can't have a constructor." "Yeah. It's not very convenient. Constructors are really important." "As the saying goes, nothing's impossible if you want it bad enough." "Remember, static variables don't have static constructors, but there is a static initializer – the static block." "Yeah, I remember." "Anonymous inner classes have the exact same initializer ..."
Practice using anonymous inner classes
"And here are new tasks for my friend ..."
Learning to google. How to download videos from the Internet
"Hi, Amigo!" "Hi, Julio." "You know, I started following your advice and googled everything you asked for. "It's true that the Internet has a lot of answers, including examples. I also found a cool website: SakOverlow. Or something like that." "StackOverflow (http://stackoverflow.com/) is the largest website/forum for programmers to help programmers (including beginners!). You'll almost always receive ..."
Useful links from the Professor — 24
"Hi, Amigo! I don't understand these interactive lessons. In my time, all that a student could count on was a good ol' boring lesson." "But, Professor... Your lessons are not so boring!" "I feel the same way." For today, here's one for you on the inheritance of nested classes, with examples ..."