Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

JAVA OOP

Interview prep

QuestionAnswer
OOP Object Oriented Programming programming paradigm building blocks: Class and Object.
Class Attributes and methods defining an Object
Object Instance of a class with it's particular methods and properties
OOP Concepts Polymorphism Inheritance Abstraction Encapsulation +Aggreagation +Composition +Association
Polymorphism the ability of an object to take on many forms two types: compile time (overloading) and runtime (overriding).
Inheritance allows a Child class to inherit properties from its parent class extends keyword Only properties with access modifier public and protected can be accessed in child class.
Abstraction a way of converting real world objects in terms of class.
Encapsulation Combination of methods and attribute into a class. The class protect it's properties by exposing only public methods.
Aggreagation child object can not belongs to another parent object. 1 teacher -> 1 dept if we delete the department teacher object will not destroy
Composition if parent object deletes all child object will also be deleted 1 house -> N rooms
Association relationship where all object have their own lifecycle and there is no owner. Both can create and delete independently. Ex: N students -> 1 teacher 1 student -> N teachers
Overloading compile time polymorphism same name but different method signature or different number or type of parameters.
Overriding runtime polymorphism method in a child class has the same name and signature as a method in the parent class.
multiple inheritance If a child class inherits the property from multiple classes
does java support multiple inheritance? No. at runtime it becomes difficult for the compiler to decide which method to execute from the child class.
difference between polymorphism and inheritance? Inheritance defines parent-child relationship between two classes, polymorphism takes advantage of that relationship to add dynamic behavior in your code.
does java support multiple inheritance of interface? Yes. Resolves the Diamond problem.
Diamond problem. ambiguity where the compiler doesn't know which superclass method to execute
Interface implement keyword can only contain public abstract methods. variable is by default public final contract: its mandatory to implement all of its methods
abstract class extends keyword mandatory to implement all abstract methods.
access modifiers Private: inside the class Protected: same package, or diff pkg if the class extends the main class Default: only accessible in the same package Public: accessible from a diff pkg
final keyword Class : cannot be extended. method: cannot be overridden. variable: value cannot be changed. Objects: instantiated only once
Synchronized keyword Only one thread at a time can access synchronized methods
Static variable Multiples objects of a class shares the same instance of a static variable.
Static method can be accessed without creating the objects can only access static variables and not local or global non-static variables
Static class if all the variables and methods of the class are static and the constructor is private. prevent the class to be instantiated. So the only possibility to access is using Class name only
Throw keyword used to throw the exception manually subclass of Throwable.
JDK, JRE and JVM Java Development Kit: software development tools Java Runtime Environment: Library and classes, env to execute Java applications Java Virtual Machine: Runtime Instance
Created by: 3336678016347028
Popular Computers sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards