0 0
Read Time:20 Second

Write a program to check if the letter ‘e’ is present in the word ‘Umbrella’

public class CheckLetterExample {
  public static void main(String[] args) {
    String word = "Umbrella";
    boolean containsE = word.contains("e");
    if (containsE) {
      System.out.println("The word " + word + " contains the letter 'e'");
    } else {
      System.out.println("The word " + word + " does not contain the letter 'e'");
    }
  }
}

Output:

The word Umbrella contains the letter 'e'
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
50%
1 Star
50%

2 thoughts on “How to check if the letter ‘e’ is present in the word?

  1. Wow, wonderful blog structure! How lengthy have you ever been running
    a blog for? you make blogging glance easy. The entire look
    of your website is magnificent, let alone the content material!

  2. Greetings from Los angeles! I’m bored to death at
    work so I decided to browse your website on my iphone during lunch break.
    I enjoy the info you present here and can’t wait to take a look when I get home.
    I’m surprised at how quick your blog loaded on my
    cell phone .. I’m not even using WIFI, just 3G ..

    Anyways, good blog!

Leave a Comment