Search:

Type: Posts; User: Poonti

Search: Search took 0.09 seconds.

  1. Re: Need to find out if a String has consecutive letters or digits with LOOPING ('89012' or 'bazyx')

    I'm really lost.

    import java.util.Scanner;
    public class Question1 {
    public static void main(String[] args) {
    System.out.println("Enter 4 or less characters.");
    Scanner...
  2. Re: Need to find out if a String has consecutive letters or digits with LOOPING ('89012' or 'bazyx')

    Instead of using 'a' in the code?
  3. Re: Need to find out if a String has consecutive letters or digits with LOOPING ('89012' or 'bazyx')

    I'm not sure what you mean by the first sentence.
  4. Re: Need to find out if a String has consecutive letters or digits with LOOPING ('89012' or 'bazyx')

    I'm not saying it would tell me what's in between. I'm saying it would narrow down my test. Without knowing if its ascending or descending then I'll have to test for either + or - which doesn't...
  5. Re: Need to find out if a String has consecutive letters or digits with LOOPING ('89012' or 'bazyx')

    Hm. I think first it would be best to test for all numbers or all letters using match() (after turning to lowercase)
    Then once I know that there are two options. For letters, I will check the first...
  6. Re: Need to find out if a String has consecutive letters or digits with LOOPING ('89012' or 'bazyx')

    can i do something like this? this code would be after I've found out the code is all letters and is ascending (I think I would need to find that out beforehand because for numbers the case needs to...
  7. Re: Need to find out if a String has consecutive letters or digits with LOOPING ('89012' or 'bazyx')

    I have no clue how to test for both (+/-1 or + /-25 for letters, and +/-1 or +/-9 for numbers) using (charAt(i) == charAt(i + 1))
  8. Re: Need to find out if a String has consecutive letters or digits with LOOPING ('89012' or 'bazyx')

    That is correct. And if you can, just guide me. I want to create the simplest way to solve this. The precious assignment had a similar question but instead it was using integers only, up or down, but...
  9. Re: Need to find out if a String has consecutive letters or digits with LOOPING ('89012' or 'bazyx')

    how do you compare it? how do you make sure its either only numbers or only letters? how do you make it so 'z' followed by an 'a' works, and 'a' followed by 'b' does as well? weve only learned if...
  10. Need to find out if a String has consecutive letters or digits with LOOPING ('89012' or 'bazyx')

    I have no idea what the best way of going about coding this is. I've been stuck on it for a couple of hours now...

    It has to be consecutive, either forwards or backwards, and has to loop. I think...
Results 1 to 10 of 10