THINK FIRST·CODE LATER

← All labs

Initials and vowels in a name

Problem

Write a class NameTool that reads a full name on one line (for example hamza djigal) and prints:

  • the initials in capitals, as Initials: H.D.
  • the number of vowels (a, e, i, o, u, in any case), as Vowels: 3

The name always has a first name and a family name, separated by one space. Read the line with nextLine().

Write it here or in your IDE, then paste it. Compile and test it yourself before comparing. Your code stays in your browser — it is never sent to or stored on the server.