Skip to content
Coding Fanatic
  • Android Development
  • News and Reviews
  • Road2Pro
  • Tutorials
  • Services
  • About

Where is the address? 19/100 Days of Code

  • March 25, 2019March 25, 2019
  • by Richard Clarke

Before my program could format the addresses, it first had to determine the zip code was formatted properly.

To ensure the zip code entered was in the right format, the program now returns the zip code if it is not 8 characters long. This works for all zip codes since they should be in the format SS ZZZZZ.

The next part of the program checks whether or not the zip code entered is in the list. For now, if the address is found, the program prints a simple statement to log a successful execution.

The program uses a series of nested if statements to confirm the existence of an address with a matching zip code.

In the trailing else, if the zipcode is not found in the list, it is returned in the format SS: ZZZZZ:/

Everything looks good so far. Tomorrow I’ll continue with a story about a weird error I got while coding the if statements.

Related

Git Up and Code, 18/100 Days of Code
I Can Hardly Reach! 20/100 Days of Code
Richard Clarke
Richard is currently a developer using Java and Android Studio to build custom applications for Android. Richard tutored in mathematics at Montgomery College, and worked in Information Technology before entering the Software Development industry as a Quality Engineer.
100daysofcode Java Programming

Related articles

Your New Favorite Stopwatch App!…
Two for Two BABY! 7…
…But the App is for…
Play Store Blues – 5…
Top 4 Tips for Android…
No Dice – 3 of…

Leave a Reply Cancel reply

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

Join the mailing list!

This field is required.

Check your inbox or spam folder to confirm your subscription.

Follow me on social media!

  • GitHub
  • YouTube
  • X
  • Instagram
  • LinkedIn
My Tweets

Join the mailing list!

This field is required.

Check your inbox or spam folder to confirm your subscription.

Follow me on social media!

  • X
  • GitHub
  • LinkedIn
  • YouTube

Archives

Theme by Colorlib Powered by WordPress