Access Modifiers - Day 3 Flashcards

1
Q

Access modifiers

A

Access levels to classes

4 types

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

Public -

A

open to everything

Within the project

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

Private -

A

only open to the class

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

Protected -

A

accessible inside the same package and sub classes

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

Default -

A

accessible inside same package

Can affect how classes are made

If not stated, members have default access

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