Join David Gassner for an in-depth discussion in this video Using anonymous inner classes, part of Java Advanced Training.
- View Offline
- Exercise Files
So far I've described the progression in hiding code.…Starting with creating member classes that are members of other classes, then moving…to local inner classes where you define a class as a part of a code block or a method…definition and in this final step in the progression, I'll go even a little further by defining…a local anonymous class.…An anonymous class is just that it doesn't have a name, it's defined and used exactly once.…I'll do this in the version of the project I have been working on called a non-classes.…
As with the other projects, it hasn't an oliveJar class, which right now has a local inner…classed named JarLid. I'm going to re-factor that class to make it an anonymous class.…I decide as a programmer that this functionality only has to be called once and only from within…this method and so therefore, I don't even need to give this class a name, I can simply…define it and then call its method.…So, I place the cursor after the current call to class's open method and the first step…
- Installing Java on Windows and Mac OS X
- Installing Eclipse
- Using new features such as simplified generics
- Working with advanced class structures (member, local inner, etc.)
- Using the Reflection API
- Navigating inheritance trees
- Managing unordered and ordered sets
- Peeking and polling with queues
- Testing and error handling
- Managing files and directories
- Working with I/O streams
- Next steps with Java
Skill Level Advanced
1. Getting Started
2. Java 7 New Features
3. Using Advanced Class Structures
4. Using the Reflection API
5. More of the Collections Framework
6. Testing and Advanced Exception Handling
Using the finally keyword5m 40s
7. Managing Files and Directories in Java 7
8. Working with I/O Streams
9. Working with Multi-threading
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.