Basics Flashcards
(23 cards)
What is the oops concept?
Inheritance, polymorphism, abstraction, encapsulation
What is encapsulation?
when you set variables to private and use the get and set methods to update and access the variables
What is inheritance?
when a sub class takes properties from the super class
What is polymorphism?
many classes that inherit from the same super class and same functions with many actions
What is abstraction?
is used to hide and show some data to the users.
Method Overloading
multiple methods have the same name with different classes
method overriding
subclass can take a method from a parent class and give its own defintion
interface
completely abstract class that is used to group related methods with empty bodies
new keyword
is used to create the object
instance variables
are non static variables that are created outside a method class
static
we can access the methods without creating the object
array
multiple values ti a single variables
java collection
a single unit of objects i.e. a group
collection types
arraylist, linklist, hashset, hashmap
hashmap and hashset
multiple values; doesnt allow duplicate values
hashmap
key and value pair; cannot duplicate the key but can the value
linklist
like arraylist but with more features
arraylist
resizable array
access modifiers
public, private, protected, default
public
accessible from every class
private
accessible from within the class
protected
accessible within the packaged
default
same as protected but becomes default when not declared