What this deck covers
This deck focuses on Calling Instance Methods, giving you a quick way to review the definitions, rules, and examples that matter most for AP Computer Science a.
Study Calling Instance Methods in AP Computer Science a with focused flashcards that help you recognize the idea, recall the key rule, and apply it in practice-style prompts.
0% Complete
What keyword is used to refer to the current object in an instance method?
Tap card or press Space to flip
this. References the current object instance within methods.
How well did you know it?
Card 1 / 80
Space to flip · ← / → to move · once flipped, → Got it · ← Still learning
This deck focuses on Calling Instance Methods, giving you a quick way to review the definitions, rules, and examples that matter most for AP Computer Science a.
Work through these flashcards in short sessions. Try to answer each prompt before flipping the card, then revisit any cards you miss until the explanation feels automatic.
Answer: this. References the current object instance within methods.
Answer: A method that operates on an instance of a class. Operates on specific object instances and can access instance variables.
Answer: Package-private (default). No modifier means package-private visibility within same package.
Answer: A compile-time error occurs. Type mismatch prevents compilation; arguments must match parameters.
Answer: The method does not return a value. Method completes without returning any data to caller.
Answer: obj.compute();. Standard dot notation for calling methods on objects.
Answer: Different parameter lists. Overloading requires distinct parameter signatures for each version.
Answer: The method is accessible from any other class. Highest visibility level allowing access from any class.
Answer: A method with the same name but different parameters. Same name but different parameter list creates overload.
Answer: A compile-time error occurs. Void methods cannot return values; causes compilation failure.
Answer: Cannot access from outside package or subclass. Protected access requires package membership or inheritance relationship.
Answer: obj.update(newValue);. Standard method call with single argument parameter.
Answer: No, it requires an object. Instance methods need object context to access instance data.
Answer: Provide an argument: 'object.method(arg);'. Missing argument causes compile error; provide required parameter.
Answer: No, 'this' is not available in static methods. 'this' refers to instance; static methods have no instance.
Answer: Exits the method and optionally returns a value. Terminates method execution and sends result to caller.
Answer: int. Return type appears before method name in declaration.
Answer: When the method needs to access instance fields. Instance methods can access and modify object state.
Answer: calc.add(4, 5);. Pass arguments in parentheses matching parameter types.
Answer: Cannot access from outside package or subclass. Protected access requires package membership or inheritance relationship.
Answer: There is no default; return type must be specified. Java requires explicit return type specification for all methods.
Answer: The number, type, and order of parameters. Method signature must exactly match call arguments.
Answer: An instance of the class. Instance methods must be called on specific object instances.
Answer: To refer to the current instance of a class. Disambiguates between instance variables and parameters with same name.
Answer: Accessible within package and subclasses. Visible to package members and subclasses only.
Answer: obj.calculate();. Use dot notation: objectName.methodName();
Answer: Remove the arguments: 'obj.method();'. Too many arguments causes compile error; remove extras.
Answer: Package-private (default). No modifier means package-private visibility within same package.
Answer: The method does not return a value. Method completes without returning any data to caller.
Answer: Instance methods require an object to be called; static do not. Static methods belong to class; instance methods belong to objects.
Answer: A method with the same name but different parameters. Same name but different parameter list creates overload.
Answer: Calling multiple methods on the same object in a single statement. Links method calls together for fluent programming style.
Answer: No, 'this' is not available in static methods. 'this' refers to instance; static methods have no instance.
Answer: It causes a compile-time error. Void methods cannot return values; only execution control.
Answer: Provide an argument: 'object.method(arg);'. Missing argument causes compile error; provide required parameter.
Answer: printer.print();. Empty parentheses indicate no parameters required.
Answer: The number, type, and order of parameters. Method signature must exactly match call arguments.
Answer: vehicle.run(speed);. Argument passes data to method parameter.
Answer: Different parameter lists. Overloading requires distinct parameter signatures for each version.
Answer: Multiple methods with the same name but different parameters. Provides multiple method implementations for different parameter types.
Answer: No, it requires an object. Instance methods need object context to access instance data.
Answer: printer.print();. Empty parentheses indicate no parameters required.
Answer: There is no default; return type must be specified. Java requires explicit return type specification for all methods.
Answer: screenObj.display();. Standard object.method() syntax for instance method calls.
Answer: accessModifier returnType methodName(parameters) { body }. Standard format for declaring methods with optional parameters.
Answer: obj.update(newValue);. Standard method call with single argument parameter.
Answer: To define methods with the same name but different parameters. Enables multiple method versions with different parameter signatures.
Answer: Calling multiple methods on the same object in a single statement. Links method calls together for fluent programming style.
Answer: screen.display(message);. Passes string argument to display method parameter.
Answer: Use 'this.methodName()'. Optional 'this.' prefix clarifies current object method call.
Answer: obj.calculate();. Use dot notation: objectName.methodName();
Answer: Instance methods require an object to be called; static do not. Static methods belong to class; instance methods belong to objects.
Answer: When the method needs to access instance fields. Instance methods can access and modify object state.
Answer: If non-void, causes a compile-time error. Non-void methods must return value; missing return fails compilation.
Answer: accessModifier returnType methodName(parameters) { body }. Standard format for declaring methods with optional parameters.
Answer: A compile-time error occurs. Type mismatch prevents compilation; arguments must match parameters.
Answer: To define methods with the same name but different parameters. Enables multiple method versions with different parameter signatures.
Answer: this. References the current object instance within methods.
Answer: Cannot access private method from outside class. Private methods only accessible within same class.
Answer: Multiple methods with the same name but different parameters. Provides multiple method implementations for different parameter types.
Answer: The method is accessible from any other class. Highest visibility level allowing access from any class.
Answer: Remove the arguments: 'obj.method();'. Too many arguments causes compile error; remove extras.
Answer: screen.display(message);. Passes string argument to display method parameter.
Answer: int. Return type appears before method name in declaration.
Answer: To refer to the current instance of a class. Disambiguates between instance variables and parameters with same name.
Answer: vehicle.run(speed);. Argument passes data to method parameter.
Answer: Use 'this.methodName()'. Optional 'this.' prefix clarifies current object method call.
Answer: An instance of the class. Instance methods must be called on specific object instances.
Answer: calc.add(4, 5);. Pass arguments in parentheses matching parameter types.
Answer: It causes a compile-time error. Void methods cannot return values; only execution control.
Answer: screenObj.display();. Standard object.method() syntax for instance method calls.
Answer: If non-void, causes a compile-time error. Non-void methods must return value; missing return fails compilation.
Answer: A compile-time error occurs. Void methods cannot return values; causes compilation failure.
Answer: Cannot access private method from outside class. Private methods only accessible within same class.
Answer: They allow input to be passed to the method. Parameters accept data from caller for method processing.
Answer: They allow input to be passed to the method. Parameters accept data from caller for method processing.
Answer: Accessible within package and subclasses. Visible to package members and subclasses only.
Answer: Exits the method and optionally returns a value. Terminates method execution and sends result to caller.
Answer: obj.compute();. Standard dot notation for calling methods on objects.
Answer: A method that operates on an instance of a class. Operates on specific object instances and can access instance variables.