User Profile

Collapse

Profile Sidebar

Collapse
Heyjude579
Heyjude579
Last Activity: Nov 19 '11, 01:28 AM
Joined: Nov 18 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Heyjude579
    started a topic I'm getting a return statement error
    in Java

    I'm getting a return statement error

    I'm new to Java. I'm getting the following error from my code:
    (Palindrome.jav a:30: error: missing return statement
    } // close method)


    My code is:

    [public class Palindrome { // define class palindrome

    public static boolean isPalindrome(St ring inputWord) { //define method

    int rightSide = inputWord.lengt h() -1; // right side

    while (leftSide...
    See more | Go to post

  • how do I code to check if a string does not equal another string? a value?

    I understand how to use the equals, and know that there is an option to use '!' for unequal check, but in my case, I am testing against a value in quotes. See my code below.... how do I use the '!' to check against a value in quotes? I also would like to change this test to a while loop, rather than an if/else. I am hoping this will still work in that case (??)

    if ("quit".equals( inputWord)) { // checks for string=quit....
    See more | Go to post
No activity results to display
Show More
Working...