1 package com.review; 2 3 import java.util.Scanner; 4 5 /** 6 * @program: com.review 7 * @description: 8 * @author: Mr.Lin 9 * @create: 2019年8月13日10 **/11 public class Quiz {12 static Scanner sc = new Scanner(System.in);13 public static void main(String[] args) {14 System.out.println("输入一句话,包含wqnmlgb,ndy,dsb等字符,将会被和谐");15 String character = sc.next(); //获取用户输入16 //创建关键字和谐数组17 String characters[] = {"wqnmlgb","ndy","dsd"};18 //遍历数组,判断用户是否输入关键字19 for(int i=0;i