Reflection, Maven, Gradle Flashcards

1
Q

What is the reflection in Java, and what can you achieve with it?

A
Reflection is a feature of the Java programming language, that allows an executing Java program to examine or "introspect" upon itself, and manipulate internal properties of the program. For example, it's possible for a Java class to obtain the names of all its members and display them. In other words reflection allows us to inspect and/or modify runtime attributes of classes, interfaces, fields, and methods. This particularly comes in handy when we don't know their names at compile time.
We can also instantiate new objects, invoke methods, and get or set field values using reflection.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Maven?

A

Maven is a build automation tool used primarily for Java projects. Powerful project management tool that is based on POM (project object model). Used for projects build, dependency and documentation.

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

Name some Maven Phases

A

○ validate: validate the project is correct and all necessary information is available
○ compile: compile the source code of the project
○ test: test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
○ package: take the compiled code and package it in its distributable format, such as a JAR.
○ integration-test: process and deploy the package if necessary into an environment where integration tests can be run
○ verify: run any checks to verify the package is valid and meets quality criteria
○ install: install the package into the local repository, for use as a dependency in other projects locally
deploy: done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.

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

What is Gradle?

A

A build automation tool for multi-language software development. It controls the development process in the tasks of compilation and packaging to testing, deployment, and publishing. Supported languages include Java, C/C++, and JavaScript.
Known for its flexibility to build software. A build automation tool is used to automate the creation of applications. The building process includes compiling, linking, and packaging the code. The process becomes more consistent with the help of build automation tools. Similar to Maven.

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