Menu
Question Index
...


Write a program to validate the given name.

Input (String) Output
KiranKumarReddy true
Sonia true
SharukKhan? false
12MaheshBabu false
Prabhas234 false
ViratKohli_!@# false
"" (EMPTY STRING) false
null false

class ValidName

{    public static void main(String s[])
    {
        String name = "Prabhas";
        boolean result = isValidName(name);
        System.out.println("The given name "+name+" is valid : "+result);

    }


public static boolean isValidName(String name)
{
boolean result = false;
//Write a code here to validate given name and assign to result.
return result;
}
}

Doubts

Problems

Topic: StringBuffer getChars() Method In Java With Example

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App