Query: The import java.util.ArrayList cannot be resolved Java

Hello All, I am facing some issues while I am trying to run this java program in vscode on online compiler but it shows an error on the 2nd line (The import java.util.ArrayList cannot be resolved Java(268435846)) and 6th line. But it gives correct output in an online compiler. Any suggestions?

Content-Key: 1570919219

Url: https://administrator.pro/contentid/1570919219

Printed on: January 21, 2022 at 08:01 o'clock

Mitglied: 149569
149569 Dec 08, 2021 updated at 11:54:21 (UTC)
Goto Top
This runs correctly in the online compiler
https://www.interviewbit.com/online-java-compiler/
same here
https://tio.run/##dY2xCoMwEEBn8xWHUxwa7CwdStdujqXD1YjEnokkp0WK325jBZfS6b ...

screenshot

(The import java.util.ArrayList cannot be resolved Java(268435846))
If you get this error you do not have defined the correct java library for your project, or include pathes are faulty.