No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
This is making me angry. I keep getting a "this method must return a result of type int" error message, but obviously I have a return statement. This is a program that is supposed to perform a sequential search for a string index. [code=java] public static int nameSearch(String[] inOrder, String … | |
[code]import java.io.*; class Factorial1 { int fact(int n) { if(n==1) System.out.println(1); else return (fact(n-1) * n); } } public class Recursion11 { public static void main(String args[]) { Factorial1 f = new Factorial1(); System.out.println("Factorial of 3 is " + f.fact(3)); System.out.println("Factorial of 4 is " + f.fact(4)); System.out.println("Factorial of 5 … |