have you tried length()? Im not sure its in there but you seem to misspell length consistently.
Type: Posts; User: CjStaal
have you tried length()? Im not sure its in there but you seem to misspell length consistently.
Please delete thread, I fixed it :)
I was probably doing something wrong. It was allowing weird flights.
I watched a lecture from mitopencourseware dealing with Bellman Ford algorithm and implemented a modified version of that to...
Buy Heads up design patterns, it's not expensive and a great read.
Ok, so a flight may connect Chicago to NY, but no flight from NY to Chicago [needs to go through Boston].
Here's the thing though, the algorithm I'm using right now -- it seems it's allowing...
I've looked up examples online of the algorithm, and I've decided to rework the entire project, AGAIN lol. Well, It's going to be right this time.
That's exactly what I need! Thanks so much!! My "Graph" would be the hashmap I have in the main class? I've encapsulated it to be its own class.
Here's the entire code
deleted code since...
I have a college assignment.
I already have it working with a depth first search on the data structure [it's not a tree since there are loops]
Basically, the professor just wants the program to...
....edited by moderator
Looks very similar to this post
http://www.javaprogrammingforums.com/whats-wrong-my-code/15196-problem-running-random-class.html
So your re-writing it? Why did you create a new account?
If you...
check for dramatic change in hue and/or saturation
Well I figured out what the problem was, my adding after filling up the array was flawed
for(int x = 0; x<CompFiles.length; x++)
{
int stat = c.compareTo((Wrapper) CompFiles[x]);...
Ah, just an FYI, I fixed everything. The problem was how Java swing handled the updates of the jFrame, only updating AFTER the actionPerformed thread was done and returned to the main thread. I...
while (flag=true)
That just makes flag true every iteration, you mean while(flag==true) which honestly can just be while(flag)
Looks right, If that's all the problem stated, then it looks done.
I'd remove the 2 tabs from the try though -- but that's just semantics.
You need to take the return out of your switch statment next -- it's ending the game when it gets to that.
Now I'm getting
Car Cricket Game
================
Scoring: non...
Have you first corrected the error I've pointed out?
What I'm getting
Car Cricket Game
================
Scoring: non white/black/red/green/yellow/blue/orange car: 0 runs.
White/black car: 1...
you have a little bit of a misunderstanding on how do while loops work.
Instead, take away the do and the semicolon at the end of the while
Theres
do{
//code
}while(this statement is still...
& try splitting it up, using a settings class -- will make the entire code a lot cleaner. Also, your doing a lot of weird stuff that you don't really need to in the code.
Take away the do and its brackets, and take away the semicolon from the end of the while loop.
Should be this
import java.util.*;
import java.util.Random;
public class AssigOne112
{...
If you want the entire source for compilation purposes, let me know and I'll post it.
Okay, I know my issue is in my add function [adds to the array]
so I'll only post that portion of the code
public void add(Comparable<Wrapper> c)
{
for(int x =0; x<CompFiles.length ; x++)...
Why not? I love eclipse
import these workspace folders in eclipse
It's hard to explain. I tried already it messes up since the GUI and logic need to be in 2 different threads or else it hangs up and never shows the 2nd buttons value if it doesnt match the first...