Java Program For Conditional Operators

Get Job-ready: Java Course with 45+ Real-time Projects! - Learn Java

Program 1

class TestCondition
{
    public static void main(String args[])
   {
        char ch='t' ;
       String str;
      str=(ch=='a' || ch=='e' || ch=='i' || ch=='o'|| ch=='u' ||ch=='A' || ch=='E' || ch=='I' || ch=='O'|| ch=='U' ) ? "Character is Vowel":"Character is not vowel";

       System.out.println(str);               
   }
}

You give me 15 seconds I promise you best tutorials
Please share your happy experience on Google

courses

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

Your email address will not be published. Required fields are marked *