Pls tell me hoe to validate name in core java

What the hell do you mean by 'name' ?

and validate against what?
one hard-coded name? a list of names in a db?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.