基础题, 代码如下:
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); if(str.length() <= 7 && !str.equals("")) { System.out.print("Hello " + str); } else { return; } } }