Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8685527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:35:53+00:00 2026-06-12T22:35:53+00:00

I am in an intro to Java class and we have to make a

  • 0

I am in an intro to Java class and we have to make a numerology program. i have everything except the data validation done. We have to validate that the date put in was put correctly, including the forward slash. I tried using

    if(slash1 !< /)
    continue;

as it is in a while statement to make the whole thing repeat if something is incorrect. It always tells me that using a forward slash is invalid. Could someone point me in the direction of how to solve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:35:55+00:00Added an answer on June 12, 2026 at 10:35 pm

    It’s a little difficult to help until you post a bit more code and example data – what you have posted isn’t valid Java…

    You have !<, which is not a valid operator in Java, only !=.

    You also have a plain / in the code, which is not legal Java – you’d have to quote it "/" or '/' to make it a legal String or char literal.

    If you want to compare something against a String such as “/”, you need to use .equals() or .contains() or similar methods. Do not try to compare Strings using == or != or you will get confusing results.

    A powerful way to validate string patterns is to use Regular Expressions – see the Java tutorial on this topic.

    Another way (for dates) is to define a SimpleDateFormat for your desired pattern.

    Hope that helps…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java class that I'm debating what I should make it into
I am developing a program in Java that I will use for registering data.
For my Java class, we need to make a bank account that has the
i have to make a java program (an artichoke cipher) well... please help lol
I have a program that lets a user select any .class or .jar file
I have a homework assignment in Java that is tested using the commands: make
Final goal: Have a few java objects sharing the same base class persisted into
Intro : I have a native library (C++) with Java (JNI) wrapper. The library
Let's say I have a Java class abstract class Base { abstract void init();
I have to make a function that have to make a get into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.