You here make another one by pretending, AI was just some random tool, like a screwdriver or a programming language.
AI can make decisions autonomously that would otherwise require a human. Like selecting people to be murdered by drone strike based on arbitrary criteria. A programming language by itself, JAVA, cannot do that.