M3 Flashcards

1
Q

Is a blueprint for the object. Before we create an object, we first need to define the class.

A

Class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Is called an instance of a class.

A

Object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Is a blueprint or template for
creating objects. It defines the properties (attributes) and behaviors (methods) that the
objects created from the class will have.

A

Class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Is an instance of a class. It represents a real-world entity that has attributes (data) and behaviors (methods). Before using an object, we must define a class first.

A

Object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

(Also known as fields or properties) are the characteristics or data that an object holds.
• They represent the state or information about an object.

A

Attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Are functions or procedures defined within a class that describe the behavior of the object.
Can perform actions, modify attributes, or return a result.

A

Methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

We can create our own method based on our requirements

A

User Defines Methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

These are built-in methods in Java that are available to use.

A

Standard Library Methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

It specifies what type of value a method returns. For example if a method has an int return type then it returns an integer value.

A

returnType

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

It is an identifier that is used to refer to the particular method in a program.

A

methodName

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

It includes the programming statements that are used to perform some tasks. The method body is enclosed inside the curly braces { }.

A

Method body

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

It defines access types whether the method is public, private,and so on.

A

Modifier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

If we use the static keyword, it
can be accessed without creating
objects.

A

Static

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

These are values passed to a method. We can pass any number of arguments to a method.

A

parameter1/parameter2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

is a value accepted by the method. As mentioned earlier, a method can also have any number of parameters.

A

Method parameter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Are used to get the value of a private field

A

Accessors/Getters

17
Q

Are used to set the value of a private field.

A

Mutators/Setters

18
Q

Commonly known as a get
method or simply a getter. A
property of the object is
returned by the accessor
method. They are declared as
public.

A

Accessor Method

19
Q

Commonly known as a set
method or simply a setter. A
Mutator method mutates
things, in other words change
things. They are also known as
modifiers.

A

Mutator Method

20
Q

Is a special method that is used to
initialize objects. It is used to
initialize the attributes of an
object or run a block of code

A

Constructor