0

Write a Java application that helps a programmer check that the name to be used for a variable is syntactically correct. The rule for a valid Java name (called an identifier and is described on page 35 of the textbook) is a sequence of letters, digits, underscores (_) and dollar ($) signs. In addition, the first character of the name can be any one of these characters except it cannot be a number. Finally, if the name begins with the letter, then it should be a lowercase letter.

For this application, use a for loop to go through each character in the String object containing the name to check entered by the user. The body of the loop contains a number of if statements The program displays a message when an illegal character is identified and specifies why it is illegal. Below are some examples of how a user would interact with the application, use this as a guide when designing the input and output of your application.

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by bluesea50
0

You need to demonstrate more effort on these questions that you are posting. Simply posting the assignment is not sufficient and no one is going to just complete these for you.

Post what code you have. Ask specific questions about concepts you are struggling with.

0

You need to demonstrate more effort
and read page 35 in your textbook
sorry if i didn't help you but just You need to demonstrate more effort
hope you solve it

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.