FlashKeepers

Java · College · College and University

Java II: Classes and OOP

Java classes, constructors, inheritance, interfaces, abstract classes, records, enums, access modifiers, static and final, and inner classes.

About this set

41 basic cards for College Java. Set 2 of 6 in Java. It opens with "What is a class?" and "What is an object?". Study it alongside the other College sets below.

41 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?
Show answerA blueprint for creating objects that defines fields (state) and methods (behavior).
What is an object?
Show answerAn instance of a class, created using the new keyword.
What keyword is used to create an object from a class?
Show answerThe new keyword, followed by the class name and a constructor call.
What is a constructor?
Show answerA special method that initializes an object when it is created.
What is the default constructor?
Show answerA no-argument constructor automatically provided by Java if no constructors are explicitly defined.
What is constructor overloading?
Show answerDefining multiple constructors in the same class with different parameter lists.
What keyword calls another constructor in the same class?
Show answerThe this keyword, written as this(arguments).
What keyword is used to access the parent class from a subclass?
Show answerThe super keyword.
What keyword establishes inheritance in Java?
Show answerThe extends keyword, allowing a child class to inherit from a parent class.
What is method overriding?
Show answerRedefining a parent class method in a child class with the same method signature.
Does Java support multiple inheritance for classes?
Show answerNo, a class can extend only one other class.
What is the relationship between a class and an interface in Java?
Show answerA class implements an interface; it does not inherit from it.
What is an interface?
Show answerA contract that defines a set of abstract methods that any implementing class must provide.
What keyword implements an interface?
Show answerThe implements keyword.
What types of fields can an interface contain?
Show answerOnly constants, which are implicitly public static final.

26 more cards in the app

Study this set free