Assessment Prep Flashcards
What are the advantages of object oriented programming.
OOP allows for modular structure, clear program architecture and promotes code reusability.
Explain JDK JRE and JVM
JDK is the Java development kit and contains everything needed to build, compile and run Java programs. It includes compilers JRE, debuggers and tools to write the program. Java Runtime Env (JRE) Which contains everything needed to run a Java program including the JVM. JVM executes the Java bytecode. It converts the bytecode into machine specific code.
What is super keyword in Java
It is used to reference parent classesmethods and variables.
What are wrapper classes and why are they used.
Wrapper classes in Java convert primitive data types into objects. It is used to improve utility methods for conversion and manipulation
Exceptions versus Errors
Exceptions is an event that occurs during the execution of a program that disrupts the normal flow. Errors represent serious issue that is not caught by the application such as segmentation fault.
How do you handle exceptions
You can handle exceptions utilizing exception handlers like try catch finally(always executes) and throw.
Explain Inheritance
Inheritance allows child classes(sub classes) to inherits properties and behaviors (variables and methods) from another class.
Explain Polymorphism
Polymorphism allows an interface or method to be used for different types of objects. This can me achieved from method overloading or overriding. This enhance code flexibility and reuseabiliy
What is Method Override
This is a form of polymorphism allowing a class to inherit a method and define it in the subclass. ( At Runtime)
What is Method Overloading
Method Overloading is a form of polymorphism allowing multiple methods in a class to have the same name but different parameter. A good example is a add method where one utilizes ints while the other utilizes floats. ( Done at compile time)
What is encapsulation?
Encapsulation is one of the 4 pillars of OOP where attributes and methods are bundled together into a class and only expose selective information depending on the access modifiers.
What is Abstraction
Abstraction is the concept of hiding the complex implementation details and showing only necessary functionalities. It can be achieved with abstract classes and interfaces
What is the difference between abstract classes and interfaces
Classes can have abstract methods with or without implementations. Classes can only extend one abstract class. On the other hand Interfaces allows for multiple inheritance.
Difference between Java keywords private and protected
These are accesses modifiers .Protect allows access within the same subclass while private restricts access to the class only.
What are project management tools?
PMT are software applications that help plan, execute and monitor projects. It provides a centralized platform for collaboration, task tracking, resource management and project organization.
What is Maven?
Maven is a build automation tool in Java that manages dependencies, automate builds and provides a project lifecycle. ( pom.xml for dependency management)
What is the Maven Life Cycle Steps
Validating the project
Compile source code
Run tests
Packages the compiled code
Install the packages into local repo
Deploy the package to remote repo
Can you explain Agile Development Workflow?
Agile is a project management methodology that that uses a flexible iterative and incremental approach to software development focusing on customer feedback and continuous improvements. Key components include short development cycles(sprints) , regular meetings(stand-ups) and collaboration with stakeholders.
Explain Solid design principles.
Solid principle is a acronym to guide object oriented design. It is used to create systems that are modular, scalable and easy to maintaining.
S -> Single responsibility: Meaning that each class should have one responsibility.
O-> Open/Closed principle: Allowing software entities to be open for extension but closed for modification. ( Allowing entity to extend its behavior without changing source code)
L-> Liskov Substitution Principle: Which is a principle where subtypes should be substitutable for their base types.
I -> Interface Segregation Principle: Clients should not depend on interfaces they do not use
D-> Dependency Inversion: Depend on abstractions not concretions
What is DDL in SQL?
DDL are command that define the structure of databases such creating and altering tables. ( Create, Alter, Truncate, Drop)