Yes, Java can be used for AI (Artificial Intelligence). Java has many advantages such as easy to use, easy debugging, package services, better graphical representation, and so on. It also has tools like Swing and SWT (Standard Widget Toolkit). These tools make graphics and interfaces that provide appealing and sophisticated.
Also, watch this video on Machine Learning with Java: