FlashKeepers

Computer Science · AP · Test Prep

AP Computer Science A: Java Concepts

Core Java programming concepts including classes, arrays, and control flow, tested on AP Computer Science A.

About this set

40 basic cards for AP Computer Science. Set 4 of 5 in AP Computer Science A. It opens with "What is a class in Java?" and "Define an object". Study it alongside the other AP sets below.

40 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What is a class in Java?
Show answerA blueprint or template for creating objects with shared properties and methods
Define an object.
Show answerAn instance of a class that has state (attributes) and behavior (methods)
What is encapsulation?
Show answerBundling data and methods together in a class while hiding internal implementation details
What is a constructor?
Show answerA special method that initializes an object when it is created with the new keyword
What is inheritance?
Show answerA mechanism where a subclass inherits properties and methods from a parent (superclass)
What is polymorphism?
Show answerThe ability of methods to behave differently depending on the object that calls them or the parameters passed
What is an array?
Show answerAn ordered collection of elements of the same data type stored in contiguous memory
What is a method?
Show answerA block of code that performs a specific task and is defined within a class
Name the three access modifiers in Java.
Show answerpublic (accessible everywhere), private (accessible only in the class), protected (accessible in subclasses and same package)
What is an instance variable?
Show answerA variable declared within a class but outside all methods; each object has its own copy
What is a static variable?
Show answerA class variable that is shared by all instances of a class, declared with the static keyword
What is a local variable?
Show answerA variable declared and used only within a method or code block
What does the new keyword do?
Show answerCreates a new instance of a class by allocating memory and calling the constructor
What is a reference variable?
Show answerA variable that stores the memory address (reference) to an object, not the object itself
What does null represent?
Show answerA special value indicating that a reference variable does not point to any object

25 more cards in the app

Study this set free