EduLearn - Online Education Platform

Welcome to EduLearn!

Start learning today with our wide range of courses taught by industry experts. Gain new skills, advance your career, or explore new interests.

Browse Courses

A company is validating usernames for its internal employee portal

 

Every employee enters their full name as a string like “john_123”

 

your job is to write a program that does the following:

 

1. Accept a string that represents a username

 

2. Check if the username (i) contains only lowercase letters, digits and underscores (ii) starts with a lowercase (iii) has no spaces or special symbols

 

3. If valid print “username accepted”, If not valid print a msg like

 

i) username must start with a lowercase letter

 

ii) username contains invalid character

Java example programs for practice

Leave a Reply

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

EduLearn - Online Education Platform

Welcome to EduLearn!

Start learning today with our wide range of courses taught by industry experts. Gain new skills, advance your career, or explore new interests.

Browse Courses

Popular Courses

[Course Image]

Introduction to Programming

Learn the fundamentals of programming with Python in this beginner-friendly course.

12 Hours Beginner
[Course Image]

Data Science Essentials

Master the basics of data analysis, visualization, and machine learning.

20 Hours Intermediate
[Course Image]

Web Development Bootcamp

Build modern websites with HTML, CSS, JavaScript and popular frameworks.

30 Hours Beginner
[Course Image]

Digital Marketing Fundamentals

Learn SEO, social media marketing, email campaigns and analytics.

15 Hours Beginner
Educational Website Footer