I'm not too sure about your syntax
public T getSomeWork() {
synchronized (getwork) {
return iterWorkList.next(); //This gives some work/work info to the calling...
Type: Posts; User: Parranoia
I'm not too sure about your syntax
public T getSomeWork() {
synchronized (getwork) {
return iterWorkList.next(); //This gives some work/work info to the calling...
Having example code would really help to figure out what is going on, but to help you do need to use the equals method when comparing two strings with each other.
Also note that "asdf" is not equal...
Well there is a bit of an issue with your for loop
for (int counter=0; counter<=10; counter++)
You are wanting to cycle through the strings you just split up, but you do not have 10 of them...
After using the last sc.next() there is still some data left in the buffer. You need to clear the buffer after calling next()
You could set done equal to true...
Or you could use a break statement to short circuit the loop
Using get is not the only way to access members of a collection
for (String str : list)
// Iterates through each String element of the list
There is also another problem in the second for loop
for (i = 0; i > id.length() - 3; i++)
even correcting it
for (i = 0; i < id.length() - 3; i++)
You should look up regular expressions. It will help you immensely with this.
Specifically, the matches method of the string class: matches(java.lang.String)
Regular Expressions: Pattern (Java...
Most likely you may need to clear the buffer after reading in the double. This is a pretty common issue when using scanners.
What exactly are you looking for as a result? Also, what have you gotten so far as a result?
Well when you print out your game board you never actually check what is inside your board and print it out
You might not need to call the repaint() method at the end. That may be rendering the scene a second time when it is called.
Well you will need to iterate through each row and column to achieve that.
Something like this would work
for (int i = 0; i < r; i++)
for (int j = 0; j < c; j++)
...
Well, initially your lowest score is set to 0. Unless you enter a number less than 0, your for loop will not find anything "lower"
Setting the highest and lowest scores should be done after you...
It's a problem when converting between doubles and ints. You are losing precision when you subtract 0.1 then convert the result to an int. If my memory is correct, I believe when Java converts to an...
Well, we can't really help you if you don't show us any code pertaining to how you are moving the shape about
The only thing you could check is that barack and obama are actually whats being stored in the array.
In your for loop just try adding a debugging message like
System.out.println("First: " +...
Are you sure you're using the modulus operator like you expect?
convert = convert % 1;
after this statement convert will always equal 1 such that convert >= 1
When convert is < 1 convert...
You could always brute force it and calculate each possibility and find out which one is the best solution
I'm not sure that would work quite right as it isn't gathering duplicates from throughout the stack, it is only gathering consecutive duplicates.
Well just having some code to look at would help us point you in the right direction.
I assume he is referring to the new Java 8 filters.
What a filter does is takes a stream of objects and checks for the condition you gave it. If the condition is true, it will be returned in the new...
When you declare a method each parameter must be given a type. There are some instances where you did not specify a type like
public static double triArea
(double base,heig);
{
...
Well you should start by doing whatever readings your instructor has given you if you don't know anything about the topic at all.
I don't think you need to make this problem so complicated. Break it down into a few simple rules.
Read element off stack and remember it
Keep popping until this number is different and count...