Check if a character is present in a String | Learn java programming from beginning.

Опубликовано: 14 Апрель 2026
на канале: TechShiksha by Badkul Technology
1,963
9

This video explains 2 ways to findout whether a character present in a String or not.

Question

You are given a String and a character you need to check if that character is present in string or not. If its present print "yes" else print "no".

Input

Hello
l

Output

yes

Input 2

Hello
a

Output 2

no


Basic java playlist.
   • 1. Installing java | Learn java programmin...  

If you face any problem post that in comment section or post that in below telegram channel.
https://t.me/javaforfree

#FindACharacterInAString