Search:

Type: Posts; User: help_desk

Search: Search took 0.10 seconds.

  1. Re: Simple but Strange situation in my Java Code.

    Is there anyway I could send you the full project? I have checked everything my brain can check and still don't find it. I believe the problem could be from the getOperands method before passing it...
  2. Re: Simple but Strange situation in my Java Code.

    steps:
    1. user enters the following on request:

    "isPalindrome evitative"

    2. this string is passed into the commands interprete method

    3. In the interprete method, the string is split into...
  3. Re: Simple but Strange situation in my Java Code.

    I have tested it and even explained to coopeg countless times that there is virtually nothing else except the mystery remains. I passed in a string into the isPalindrome() method and wrote a couple...
  4. Re: Simple but Strange situation in my Java Code.

    What I have done is a bit lengthy. it's a project where a user has to enter the command to be executed at the command line and then the instruction is read and interpreted by getting the operator...
  5. Re: Simple but Strange situation in my Java Code.

    Everything displays as yours except the if() condition being false. This is what I want to know. I have called it just like you called. Pass in a string and then reverse it in the method and compare...
  6. Re: Simple but Strange situation in my Java Code.

    I did add some System.out.println() for the reversed and word strings. the reversed string was "evitative" while the word string was also "evitative" but when I checked their equality using the...
  7. Re: Simple but Strange situation in my Java Code.

    I stated clearly that the statement in the if() condition was NEVER executed. That means the if() condition translated/interpreted to false. Otherwise, it would have gone into the next line of
    s =...
  8. Re: Simple but Strange situation in my Java Code.

    Hi, still not getting the if() condition to be true.


    public String isPalindrome(String word) {
    StringBuilder builder = new StringBuilder(word);
    String reversed =...
  9. Re: Simple but Strange situation in my Java Code.

    Sorry, the parameters is a typo but why is the if() condition false? you mean you got it to be true?
  10. Simple but Strange situation in my Java Code.

    I have a simple code to test palindrome. I have the word "civic" and I got this code:


    public String isPalindrome(String word) {
    StringBuilder builder = new StringBuilder(word);
    String...
Results 1 to 10 of 10