Interview Flashcards
What are access modifiers?
Keywords that can be used to control the visibility of field methods
What are 4 access modifiers?
public
private
protected
default
What is a hash map?
What is a private access modifier?
can only access from within the same class
What is a default access modifier?
can only access from within the same package and not from outside
What is a protected access modifier?
can access from within the same package and from outside the class with the help of a child class
What is a public access modifier?
Access from anywhere?
Can you explain what your understanding of abstraction is?
- hiding complexities of implementation and exposing simpler interfaces
- abstract class
- interface
What is a circular array, and how is it different from a regular array?
How do you implement a circular array in Java?
How do you insert an element into a circular array?
How do you remove an element from a circular array?
How do you traverse a circular array?
What is 3%2
2 goes into 3 once and 1 is leftover
1
What is 15%4?
4 goes into 15 3 times to give us 12
then to get the remainder we do 15-12 = 3