What I have learned in Java (Part 1) Java development flow and overview

Looking back on Java

I would like to take a quick look back at what I have studied Java.

Java environment construction

Environment (tool) required or used for learning Java 1.JDK A summary of the functions required when creating Java Reference: https://wa3.i-3-i.info/word15006.html Installation reference: https://eng-entrance.com/java-install-jdk-windows 2.Eclipse IDE (Integrated Development Environment) → Tool for actually developing Java Reference: https://www.sejuku.net/blog/72127 Installation reference: https://techfun.cc/java/windows-eclipse-install.html 3. Eclipse Japanese localization package For using Eclipse in Japanese Installation reference: https://www.javadrive.jp/eclipse3/install/index4.html

Java development flow

Once the environment (tools) is complete, the next step is development.

1. Creating source code

Write a statement to the computer. Actually the main work is here. For example, like this

package abc;

public class Main {
	public static void main(String[] args) {
		System.out.println("Nice to meet you");
	}
}

2. Compile

Translate the source code described above into words that can be understood by a computer, Or it will check if the grammar is correct. This is done in Eclipse. If the grammar is incorrect, modify the source code.

3. Run

The computer works according to the contents specified in the source code. Console with the above source code (where you can talk to your computer) "Nice to meet you" is displayed in the part. スクリーンショット 2020-11-04 115350.png

Java configuration image

package abc;

public class Main {
	public static void main(String[] args) {
		System.out.println("Nice to meet you");
	}
}

スクリーンショット 2020-11-04 151037.png The project is not displayed because it is a "box" that surrounds the whole Of the Main class (3rd line) in the abc package (1st line) You can see that we are using the main method (4th line).

I will try to make it

I would like to compare each "box" to a "company". This time, the part written as "company (project)" in the figure I would like to make it.

Reception (Main class)

package generalAffairsDepartment;

import systemDevelopmentDepartment.FirstDivision;

public class Main {
	public static void main(String[] args) {
		System.out.println("Receptionist: Nice to meet you, what kind of business do you have?");
		
		//Enter your name and the person you want to call.
		System.out.println("Please enter your name.");
		String yourName = new java.util.Scanner(System.in).nextLine();
		System.out.println("Please enter the person you want to call.");
		String callerName = new java.util.Scanner(System.in).nextLine();
		
		System.out.println("Me: me," + yourName + "My name is.");
		System.out.println("myself:" + callerName + "Do you have any?");
		System.out.println("Receptionist:" + callerName + "is not it?");
		System.out.println("Receptionist: We will call you so please wait here");
		
		//Now call the engineer method of the system development department.
		String requestDetails = FirstDivision.engineer(yourName, callerName);
		
		System.out.println("After several hours,,,");
		System.out.println(callerName + ":Sorry I made you wait.");
		System.out.println(callerName + ":" + requestDetails + "Was completed.");
		System.out.println("Self: Thank you.");
	}
}

System Development Department First Division (First Division class)

package systemDevelopmentDepartment;

public class FirstDivision {
	public static String engineer(String yourName, String callerName) {
		System.out.println(callerName + ":Nice to meet you," + callerName + "My name is.");
		System.out.println(callerName + ": What kind of business do you have?");
		System.out.println("Please enter what you want to make.");
		
		//Enter what you want the engineer to make.
		String requestDetails = new java.util.Scanner(System.in).nextLine();
		
		System.out.println("myself;" + requestDetails + "I want you to make.");
		System.out.println(callerName + ": I understand." + requestDetails + "is not it?");
		System.out.println(callerName + ": Please wait at the reception.");
		
		//Returns the created one to the main method.
		return requestDetails;
	}
}

Execution and input results (contents displayed on the console) スクリーンショット 2020-11-05 113759.png It is possible to combine the main method and engineer method into one class, This time I wanted you to see that packages and classes have roles It took a shape like this.

Next time, I would like to write about "variables"!

Recommended Posts

What I have learned in Java (Part 1) Java development flow and overview
What I learned in Java (Part 4) Conditional branching and repetition
What I learned in Java (Part 2) What are variables?
What I learned in Java (Part 3) Instruction execution statement
What I learned when building a server in Java
What I learned with Java Gold
What I learned with Java Silver
[Note] What I learned in half a year from inexperienced (Java)
[Note] What I learned in half a year from inexperienced (Java) (1)
[Note] What I learned in half a year from inexperienced (Java) (3)
What I investigated in Wagby development Note 1
What is Java and Development Environment (MAC)
What I learned from Java monetary calculation
Let's think about what declarative programming is in Java and Elm (Part 1)
What i learned
Summary of what I learned in Spring Batch
I tried Mastodon's Toot and Streaming API in Java
A quick review of Java learned in class part4
What I learned ② ~ Mock ~
What I learned ① ~ DJUnit ~
A quick review of Java learned in class part3
[Rilas] What I learned in implementing the pagination function.
A quick review of Java learned in class part2
[Rails Struggle/Rails Tutorial] What you learned in Rails Tutorial Chapters 4 and 5
I tried to find out what changed in Java 9
JSON in Java and Jackson Part 1 Return JSON from the server
What happened in "Java 8 to Java 11" and how to build an environment
Reasons to use Servlet and JSP separately in Java development
I tried using Dapr in Java to facilitate microservice development
What you learned when you acquired Java SE 8 Silver and Gold
What I researched about Java 8
I made roulette in Java.
Java and Iterator Part 1 External Iterator
What I researched about Java 9
Apache Hadoop and Java 9 (Part 1)
What I researched about Java 7
First Java development in Eclipse
I tried metaprogramming in Java
What I learned about Kotlin
What I researched about Java 5
Summary of "Design Patterns Learned in Java Language (Multithread Edition)" (Part 10)
[java] What I did when comparing Lists in my own class
Summary of "Design Patterns Learned in Java Language (Multithread Edition)" (Part 7)
Summary of "Design Patterns Learned in Java Language (Multithread Edition)" (Part 3)
Summary of "Design Patterns Learned in Java Language (Multithread Edition)" (Part 9)
Summary of "Design Patterns Learned in Java Language (Multithread Edition)" (Part 6)
Summary of "Design Patterns Learned in Java Language (Multithread Edition)" (Part 4)
Summary of "Design Patterns Learned in Java Language (Multithread Edition)" (Part 5)
Summary of "Design Patterns Learned in Java Language (Multithread Edition)" (Part 2)
Summary of "Design Patterns Learned in Java Language (Multithread Edition)" (Part 1)
What I learned from doing Java work with Visual Studio Code
What I often do when I have trouble naming with Java (etc.)
Summary of "Design Patterns Learned in Java Language (Multithread Edition)" (Part 11)
Summary of "Design Patterns Learned in Java Language (Multithread Edition)" (Part 12)
Summary of "Design Patterns Learned in Java Language (Multithread Edition)" (Part 8)
What I learned from studying Rails
I sent an email in Java
I compared PHP and Java constructors
I created a PDF in Java.
Encoding and Decoding example in Java
I wrote Goldbach's theorem in java