Respuesta :

Answer:

import java.util.Scanner;

public class WordProperties

{

public static void main(String[] args)

{

Scanner in = new Scanner(System.in);

System.out.print("Enter a word: ");

String word = in.next();

 

//check if it is short (fewer than 5 letters).

if (word.length()<5)

{

System.out.println(word + " is short");

}

 

//check if it is long (at least 10 letters).

if (word.length()>=10)

{

System.out.println(word + " is long");

}

 

//check if it ends with the letter y

if (word.charAt(word.length()-1)=='y')

{

System.out.println(word + " ends in a y");

}

}

}

Explanation: