2
votes
1answer
63 views

while loop only executes once in deleteMax() heap method

package x; public class MaxHeap { private Element[] heapArray; private int maxSize; private int currentSize; public MaxHeap(int max) { maxSize = max; currentSize = ...
1
vote
1answer
233 views

move random matrix 8*8

I tried to implement Vacuum Cleaner move random,The direction of the movement should be in a array-list, so each time the machine should choose randomly 3 orientation from the list as a direction ...
0
votes
1answer
26 views

Logical issue with while statement in java method

Background Information : I'm developing a battleship game and in the game I have a 10x10 int[][] (the grid). I've developed a method which trys to hit a cell on that array or grid as long as the ...
0
votes
1answer
33 views

Using useDelimiter to divide data from txt file

I have a data in a text file which is in format: AB-9, Gregson, Brian, R T, Mr I want to divide the up into and store the first one, AB-9, in a local variable, I have done all of that but the ...
0
votes
1answer
56 views

Wait for the listener in do… while GUI

I create a program for Random processes(such 2+2 , 14/2 etc). I try to create a GUI. I have 5 buttons(Add for Add, Div for the divide etc) When the user click on Add button i send a message to ...
0
votes
1answer
139 views

While Loop not repeating

I have having a hard time getting this while loop to execute. I tried it without resetting the scanner first, and it would loop but throw the second line immediatly with the first line, so It was ...
0
votes
1answer
196 views

Loop will not reach sentinel value - Java

I have a while loop in my program that won't hit the sentinel value. The program basically reads in a database which includes a string, an int, and a double and then it loops back through. My problem ...
1
vote
0answers
61 views

Stuck in while loop with BufferedReader-java

I'm completely at a lose for why this isn't working. I've had similar loops before and they've worked fine. try{ text = new BufferedReader(new FileReader(fileName)); while ((lineOfText = ...
1
vote
0answers
113 views

Using While Loop after button press to search a multidimensional array for a value

I am relatively new to making applications for an Android phone and there is a problem that I have been trying to solve for the past week. What I am trying to do is take in 4 variables, 3 of which is ...
1
vote
0answers
111 views

What can make the eclipse debugger to skip a 'while' content to the break of the 'default' of an inner switch?

Within a java project I have the following code: public static <return> method(<parameters>){ 1 <any method call> 2 while( <conditions> ){ 3 <any method call> ...
0
votes
0answers
65 views

While loop with try catch java

So for some reason, in my while loop there is a try catch and when the catch fires, for some reason the code after the catch block is still executing with a continue statement inside the catch block. ...
0
votes
0answers
76 views

JFrame Freeze with while loop

I'm new to this forum but I can't solve this issue. I have this code: while (archivo.ready()) { iCont++; linea = archivo.readLine(); if (tryParse(linea) == null) { ...
0
votes
0answers
46 views

Typo in Oracle Wrapper Implementations Tutorial?

I was reading about making collections thread-safe and found a wrapper implementations tutorial from Oracle's "The Java(tm) Tutorials". The relevant code is: Collection<Type> c = ...
0
votes
0answers
51 views

Move children into their own ul

I have the following code in a JSP for a Vignette horizontal navigation style. Currently when it loops through the navigation nodes, it outputs all links as li's. I want to be able to check to see ...
0
votes
0answers
99 views

Java compiler breaks escape logic in while loop

I have a code fragment like the following: List<EmailTemplate> langTemplates = emailTemplateMap.get(categoryId+"_"+languageId); while (langTemplates.isEmpty() && altLanguageId <= ...

1 2 3
15 30 50 per page