Results 1 to 2 of 2
Thread: Problem with code
- 10-10-2010, 09:49 AM #1
Member
- Join Date
- Oct 2010
- Posts
- 6
- Rep Power
- 0
Problem with code
I have a method that seems to have a problem with it. Could you please point to me where I went wrong. The error is dead code and the method must return type boolean.
Java Code:public static boolean contains(int[] A, int int1){ for (int i = 0; int ,i < A.length; i++) { if (int1 == A[i]) return true; } else {return false;} } }
- 10-10-2010, 09:52 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,589
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
Can anyone see the problem with my code? problem understanding switch (newbish)
By keith in forum New To JavaReplies: 9Last Post: 09-21-2010, 04:15 PM -
problem in my code
By wannabe in forum New To JavaReplies: 5Last Post: 04-12-2010, 04:38 AM -
Problem my code..
By Miyaki in forum New To JavaReplies: 3Last Post: 03-09-2009, 12:36 AM -
Help me!!!!!!!! Problem with Code!!
By Miyaki in forum New To JavaReplies: 0Last Post: 03-08-2009, 12:26 AM -
Problem with code
By oregon in forum New To JavaReplies: 3Last Post: 08-05-2007, 05:57 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks