Results 1 to 4 of 4
Thread: Breakpoints not working :(
- 09-12-2010, 05:25 PM #1
Member
- Join Date
- Sep 2010
- Posts
- 2
- Rep Power
- 0
Breakpoints not working :(
im using NetBeans:
and this is my code:Java Code:Listening on javadebug User program running LineBreakpoint q2.java : 20 successfully submitted. Not able to submit breakpoint MethodBreakpoint [q2].conv2RevArray '(II)Lvoid;', reason: Method 'conv2RevArray' with signature '(II)Lvoid;' does not exist in class q2. User program finished
#NOTE it isn't complete, though 0 errors and logicaly sound, from what I can see.Java Code:/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Michael Crook */ import java.util.*; import java.lang.Math.*; public class q2 { static int lengthOfInt(int input) { int i; if(input < 0) { input = input*-1; } for(i = 0; (int)Math.pow(10, i)<input; i++) { input = i; } return(input); } static void conv2RevArray(int input, int[] intArray) { int n = intArray.length, i, topEnd = 0; intArray = new int[n]; for(i = 0; i<n; i++) { topEnd = topEnd * 10; intArray[(i)] = (int)(input / (1 * Math.pow(10, n - (i+1)))); topEnd = topEnd+intArray[(i)]; } return; } static int getInput(String print) { System.out.print(print); Scanner input = new Scanner(System.in); return(input.nextInt()); } static void printArray(int[] intArray) { int i; for(i = 0; i<intArray.length; i++) { System.out.print(intArray[i]); } return; } public static void main( String[] args) { int reps = 0; int endLoop = 0; int input = getInput("Please enter number to Palindorme: "); int n = lengthOfInt(input); int[] intArray = new int[n]; do { do { conv2RevArray(input, intArray); reps++; printArray(intArray); endLoop = 1; }while(reps<45 || endLoop != 1); //repetitions > 44 is how many repititions 1 would take if it didn't succed each time therefor it is max reps reps = 0; System.out.println("If you wish to quit, please enter a negative number"); input = getInput("Please enter number to Palindorme: "); }while(input >= 0); } }
pritty much, as soon as I get to int n = lengthOfInt(input); (after int input = getInput("Please enter number to Palindorme: ");) It won't debug if I put a break past there... befor there it will let me break, though as soon as I get to that point it magicaly stops debugging and gives me "User program running" and stops... Please help.... Im fucked if I can't fix this problem, owwe and after than I have a method "printArray(intArray)" which doesn't work X( please please please help :((
- 09-12-2010, 05:37 PM #2
Any ideas why the program doesn't think the above mentioned method exists?Method 'conv2RevArray' with signature '(II)Lvoid;' does not exist in class q2.
User program finished
- 09-13-2010, 12:07 PM #3
Member
- Join Date
- Sep 2010
- Posts
- 2
- Rep Power
- 0
No idea :( maybe for some reason the do loop never iterates... ill check now.
- 09-13-2010, 03:28 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Similar Threads
-
Why is my Do/While Not working?
By Meta in forum New To JavaReplies: 1Last Post: 05-11-2010, 06:05 PM -
working with JC
By yuhobebbho in forum New To JavaReplies: 0Last Post: 02-10-2010, 11:22 PM -
Java mail problem(working in intranet,but not working in iternet)
By sundarjothi in forum Advanced JavaReplies: 8Last Post: 05-28-2008, 07:00 AM -
Working With ANT
By JavaForums in forum EclipseReplies: 0Last Post: 04-26-2007, 08:16 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks