Non-static methods are functions or procedures that belong to an object and can only be accessed through an instance of the class. They can modify the state of an object and are not associated with a specific class.
Dot Notation: Dot notation is used to access non-static methods by using the name of the object followed by a dot (.) and then the method name. It allows you to call specific actions on an object.
System.out.println: System.out.println is a commonly used non-static method in Java that prints text or values to the console. It is often used for debugging purposes or displaying information to users.
Static Methods: In contrast to non-static methods, static methods belong to a class itself rather than an instance of the class. They can be called directly without creating an object and cannot modify the state of an object.
AP Computer Science A - 2.3 Calling a Void Method
Study guides for the entire semester
200k practice questions
Glossary of 50k key terms - memorize important vocab
About Fiveable
Blog
Careers
Code of Conduct
Terms of Use
Privacy Policy
CCPA Privacy Policy
Cram Mode
AP Score Calculators
Study Guides
Practice Quizzes
Glossary
Cram Events
Merch Shop
Crisis Text Line
Help Center
About Fiveable
Blog
Careers
Code of Conduct
Terms of Use
Privacy Policy
CCPA Privacy Policy
Cram Mode
AP Score Calculators
Study Guides
Practice Quizzes
Glossary
Cram Events
Merch Shop
Crisis Text Line
Help Center
© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.