[Java] TDD study # 1 environment construction & first test-driven development (July 6th, 2020)

less than 1 minute read

I built a java environment.

Operating environment

  • visual studio code
  • windows10

vscode java environment construction

I saw the site below

Immediately struggling with Hello World!

A program that displays Hello World! in java ↓


public class Test {
    public static void main(String[] args) {

Apparently it is necessary to match the file name and the class name. It was a swamp.
After that, create launch.json. Select a folder and make it a project (?)

TDD worked using maven

I saw the site below.

It is necessary to check maven in javahome from the settings.

I don’t understand java in the first place

How the class works


class AA{
    AA();        //constructor(?)
    void BB(){
    AA C = new AA();   //instance(?)

New knowledge (keyword)

–new operator
–assertEquals (argument 1, argument 2): Method to check if the arguments are equal

in conclusion

I tried to test with python with vscode (translate java test to python), but the environment construction was successful, but I gave up because I didn’t know how to write around class.
I will study TDD in java, which I am not used to for the time being.