A brief description of JAVA dependencies

This time I dealt with ** Java dependencies **.

What are dependencies in Java?

** "Dependent" ** simply means ** "using another class" **. Specifically, if either of the following two applies, it can be said that there is a dependency.

--Has another class as a local variable --Other classes are method arguments and return values

For example, let's take a bento as an example. There is rice in the lunch box. There are many other side dishes, but for the sake of simplicity, let's just take rice as an example. Then the code would look like this:

--Bento class

//Bento class
public class Bento {
 private Gohan gohan;//rice
 
 //constructor
 public class Bento(Gohan gohan) {
  this.gohan = gohan;
 }
}

This bento class is filled with rice. The code to make this bento (new) is as follows.

--Main class


public class Main {
 public static void main(String[] args) {
   
  //Generation of rice (instantiation)
  Gohan gohan = new Gohan();
 
  //Bento generation (instantiation)
  Bento bento = new Bento(Gohan);
 }
}

In this way, the fact that one ** class uses another ** is called ** dependency **.

Quote: Dripcoke

IT Terminology Dictionary-Dependencies

Recommended Posts

A brief description of JAVA dependencies
A brief explanation of commitAllowingStateLoss
Think of a Java update strategy
Sort a List of Java objects
Let's create a TODO application in Java 1 Brief explanation of MVC
A brief summary of DI and DI containers
Name a group of regular expressions (Java)
[Java] Overview of Java
Rails: A brief summary of find, find_by, where
A brief summary of Bootstrap features for beginners
About the description order of Java system properties
Do you need a memory-aware implementation of Java?
A collection of simple questions for Java beginners
A quick review of Java learned in class
A description of Interface that is often mistaken
Expired collection of java
[Java] Significance of serialVersionUID
Get a list of MBean information for Java applications
A quick review of Java learned in class part4
[Java] Create a filter
NIO.2 review of java
Review of java Shilber
A brief summary of Rails association options (foreign_key, primary_key)
java --Unification of comments
Java JUnit brief note
Awesome Java: A number of great Java framework library software
Let's make a robot! "A simple demo of Java AWT Robot"
History of Java annotation
java (merits of polymorphism)
[Java] When writing the source ... A memorandum of understanding ①
A quick review of Java learned in class part3
A quick review of Java learned in class part2
NIO review of java
A record of a brief touch on GCP's Data Flow
[Java] Three features of Java
A survey of the Kubernetes native Java framework Quarkus
Summary of Java support 2018
A brief explanation of a maze game made in Java for a cousin of an elementary school student
Story of making a task management application with swing, java
A quick explanation of the five types of static in Java
Activate Excel file A1 cell of each sheet in Java
Implementation of a math parser with recursive descent parsing (Java)
I tried to make a client of RESAS-API in Java
A note about Java GC
About an instance of java
[Java] Mirage-Basic usage of SQL
[Java] Beginner's understanding of Servlet-②
Creating a batch of Liferay
[Java] Practice of exception handling [Exception]
[Java11] Stream Summary -Advantages of Stream-
Basics of character operation (java)
[Java] Creation of original annotation
About the description of Docker-compose.yml
4th day of java learning
Java end of month plusMonths
[Java] Summary of regular expressions
Create a java method [Memo] [java11]
[Java] Summary of operators (operator)
[Java] Implementation of Faistel Network
[Java] Comparator of Collection class
[Java] Create a temporary file