Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Java (https://www.askmehelpdesk.com/forumdisplay.php?f=440)
-   -   Solve the in following java code (https://www.askmehelpdesk.com/showthread.php?t=555126)

  • Feb 17, 2011, 12:03 AM
    saenthan
    solve the in following java code
    import java.io.*;
    class vowels
    {
    public static void main(String args[])throws IOException
    {
    // this coding is to check the vowel letters
    BufferedReader s= new BufferedReader(new InputStreamreader(System.in));
    String x;
    System.out.println("enter a letter");
    (s.readLine());

    if(x.equals("a"))
    {
    System.out.println(x+"It is vowel");
    }
    else
    if(x.equals("e"))
    {
    System.out.println(x+"It is vowel");
    }
    else
    if(x.equals("i"))
    {
    System.out.println(x+"It is vowel");
    }
    else
    if(x.equals("o"))
    {
    System.out.println(x+"It is vowel");
    }
    else
    if(x.equals("u"))
    {
    System.out.println(x+"It is vowel");
    }
    else
    {
    System.out.println(x+"It is not vowel");
    }

    }
    }

  • All times are GMT -7. The time now is 05:53 PM.