To output "hello" in Java, you can use the following code:

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("hello");
    }
}

When you run this code, it will print "hello" to the console.

java输出hello