No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
4 Posted Topics
Okay so this is the deal. I want to make a call to a routine that replaces all of one certain type of integer with a number. I have it to where it is replaceing the first, however, it misses the tail node.[ICODE] public static SimpleList<Integer> replaceAll(Integer old, Integer nEw, …
[ICODE] public static boolean member(Integer obj,SimpleList<Integer> l); // returns true if obj is a member of l, false otherwise { }[/ICODE] the question is how could I use recursion to show that there is a member of a list? I thought that maybe if (l.isEmpty()) {return false} else ? thanks
import java.io.*; import java.util.StringTokenizer; public class Proj21110 { private static int MAX_UNKNOWNS = 10; public static void main (String[] args) { headerMessage(); // print header BufferedReader in = null; if(args.length > 0) { in = getReader(args[0]); // open file System.out.println("Opened file: " + args[0]); } else { in = getReader("guess.data"); …
public static void ReadArray(int []array) { Scanner scan = new Scanner(System.in); for (int index = 0; index < array.length; index ++) { System.out.println("Please enter element" + (index+1) + ": "); array[index] = scan.nextInt(); } }//end class Try something like this.....cheers
The End.
VirusTalker