keywords Flashcards

1
Q

What is keyword “native” used for?

A

The native keyword is applied to a method to indicate that the method is implemented in native code using JNI.

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

Can native be applied to data members?

A

No - just methods

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

Can keyword “synchronized” be applied to data members?

A

No

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

Can keyword “transient” be applied to data members?

A

Yes, used to indicate that a field should not be serialized.

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

Can keyword “transient” be applied to methods?

A

No

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