Java # 1: Write down the skills you learned every day

It's been a long time since Java was an embarrassing failure

I've been doing Java for business for the first time in a few years I am studying at home. I made a trivial mistake and got stuck, so make a note of the content and cause.

HashMap cannot be imported. ..

This is all I tried to do.

public class HashMap {
	public static void main(String[] args) {
		//Map declaration
		HashMap<String,String> hashmap = new HashMap<>();
	}
}

It seems that the class name should not be HashMap, and it was fixed by changing the class name. It's a reserved word.

Recommended Posts

Java # 1: Write down the skills you learned every day
Write Code Every Day! ~ 2nd year Java engineer writes code every day ~
Java is the 5th day
Java Day 2018
[Java] Memo on how to write the source