Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is a static method in Java?
Think about calling something directly from class.
Write a code snippet to demonstrate calling a non-static method.
You will need to create an object of the class.
Which method can be called without an instance?
Remember how you access static methods.
True or False: Non-static methods can directly access static variables.
Think about what restrictions apply to static methods.
Create a simple Java class exhibiting both static and non-static methods, then explain how each method works.
Make sure to test your methods after coding them.
1 more question in this section. Enroll free to practise them all.
Enroll free