Search:

Type: Posts; User: moodycrab3

Search: Search took 0.08 seconds.

  1. Replies
    1
    Views
    1,459

    [SOLVED] Run time error

    class yam
    {
    public static void findIndex()
    {
    String s="allendowlley";
    int index=0;
    int l=s.length();
    while(index<l)
    {
    index=s.indexOf('l',index);
  2. Replies
    3
    Views
    1,204

    [SOLVED] Re: String Reversal.... Not working

    OH MY GOD... u are a genius... Thank you so much... I have been trying to figure this out since yesterday... Thank you so very much....

    thank you
    thank you
  3. Replies
    3
    Views
    1,204

    [SOLVED] String Reversal.... Not working

    class jack
    {
    public static String reverseString(String s, String result,int l)
    {
    if(l>=0)
    { result=result+s.charAt(l);
    reverseString(s,result,l-1);
    return result;}
    else
    return "error";
  4. Replies
    5
    Views
    1,769

    [SOLVED] Re: Code is correct, but incorrect output?

    sorry... My bad... I understand now... Thanks everybody...
  5. Replies
    8
    Views
    1,754

    [SOLVED] Re: Can't get output HELP

    I understand what you mean.... Thanks so very much...!!!
  6. Replies
    5
    Views
    1,769

    [SOLVED] Code is correct, but incorrect output?

    class div
    {
    public static boolean div(int x, int y)
    {
    boolean pig;
    pig=x%y==0;
    if(pig)
    return pig;
    else
    return !pig;
  7. Replies
    8
    Views
    1,754

    [SOLVED] Re: Can't get output HELP

    You mean for every If statement there has to be an else statement.... or else the logic doesn't work...
  8. Replies
    8
    Views
    1,754

    [SOLVED] Re: Can't get output HELP

    Even if I add
    If(n<0)
    return 0;

    meaning even when all the possible conditions are addressed...... the output is still "return statement missing"
    I think the problem lies with the recursive...
  9. Replies
    8
    Views
    1,754

    [SOLVED] Can't get output HELP

    class keg
    {
    public static int fact(int n)
    {
    int factorial;
    if(n>0)
    {
    factorial=n*fact(n-1);
    return factorial;
    }
Results 1 to 9 of 10