Fiveable
Fiveable

Non-Static Methods

Definition

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.

Related terms

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.

"Non-Static Methods" appears in:

Study guides (1)

  • AP Computer Science A - 2.3 Calling a Void Method

collegeable - rocket pep

Are you a college student?

  • Study guides for the entire semester

  • 200k practice questions

  • Glossary of 50k key terms - memorize important vocab


Fiveable
About Us

About Fiveable

Blog

Careers

Code of Conduct

Terms of Use

Privacy Policy

CCPA Privacy Policy

Resources

Cram Mode

AP Score Calculators

Study Guides

Practice Quizzes

Glossary

Cram Events

Merch Shop

Crisis Text Line

Help Center

Stay Connected


© 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.

About Us

About Fiveable

Blog

Careers

Code of Conduct

Terms of Use

Privacy Policy

CCPA Privacy Policy

Resources

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.