I built a java environment.
I saw the site below https://qiita.com/takuma-jpn/items/b49785a314fb4db85775
A program that displays Hello World!
in java ↓
Test.java
public class Test {
public static void main(String[] args) {
System.out.println("Hello.World!");
}
}
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 (?)
I saw the site below. https://engineeringnote.hateblo.jp/entry/java/junit_with_maven_in_vscode
Notes It is necessary to check maven in javahome from the settings.
class.java
class AA{
AA(); //constructor(?)
void BB(){
AA C = new AA(); //instance(?)
C.BB()
}
}
--new operator --assertEquals (argument 1, argument 2): Method to check if the arguments are equal
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.
Recommended Posts