Learn to inspect methods with Java reflection.
- [Narrator] Working with methods is more complicated…than working with fields.…One reason is that we need to pass parameters…to methods, unless their signatures indicate…that they can be called without parameters.…To accommodate this difficulty,…we'll use a before method for our test cases.…In this method, we'll initialize an array of methods…for all of the methods in the student class.…We'll cheat a little by asserting that…there are only two declared methods in the class.…In general, if you were building a tool…that used Reflection, you would not be able…to make this type of simplifying assumption.…
We'll use the before method…to initialize two variables with two methods.…Here's our before method.…Again, we get a class object.…Here we get a methods array, and we find out…how many declared fields there are within the student class.…As I mentioned, we're going to cheat…and assert that this is equal to two.…Even though we know that there were two methods,…we're not sure of the order in which they'll be returned.…
- The IMQAV model
- Downloading software
- Installing and setting up a Java coding environment
- Mock tests
- Code coverage
- Using windows, views, and modes in IntelliJ IDEA
- Creating classes and attributes
- Creating constructors
- Casting variables
- Matching literals with regular expressions
- Regular expressions
- Design patterns
Skill Level Intermediate
Java: Database Integration with JDBCwith David Gassner2h 51m Intermediate
NumPy Data Science Essential Trainingwith Charles Kelly3h 54m Intermediate
1. Getting Started with Java
2. Test-Driven Development
3. IntelliJ IDEA
4. Object-Oriented Java
6. Regular Expressions (Regex)
8. Design Patterns
9. Applying Data Science
- 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.