It's for a data structures course and we're using the hash code to place various strings and sub strings into an array of linked lists so we can manipulate the output. It might not be the best...
Type: Posts; User: Nismoz3255
It's for a data structures course and we're using the hash code to place various strings and sub strings into an array of linked lists so we can manipulate the output. It might not be the best...
I thought I was adding something to the array using list[h].add(s). I figured this would add the first element to that LinkedList and thus the array wouldn't be null at that value in the array. So I...
Here I have an array of LinkedLists of the string type. I'm trying to store the string in the hash code index of my array but I'm getting a Null Pointer exception when i try to add it. Does this have...
I did try type casting to the DynamicArrayOfInts class buts it says it cannot compare types int and DynamicArrayOfInts. The class up to this point looks like this:
class DynamicArrayOfInts {
...
I'm getting an error that says aThat.size cannot be resolved to a field. I assumed it was because the Object class doesn't have a distinct size field where as my DynamicArrayOfInts class does have...
I'm trying to write a method for a dynamic array class that compares the size of the current dynamic array to the one passed in from the method. The issue i'm having is that the type in the method...
I'm having some trouble figuring out why this code is outputting twice. When I run this method in my main program it will output the phrase "That is not the name of a sphere" no matter what the value...
Alright, I got it to work. Thanks. I was initially confused because it was supposed to be a void method, and I was having difficulty changing the initial array into the larger one without returning...
I'm trying to take a given array and increment the capacity by a certain integer. The program runs and returns the original and incremented array with the same length. Any ideas?
public static...
This loop is supposed to take a user inputted string, compare it to a string variable of another class that is stored in an array and if they're equal it is supposed to have the user edit the...
I'm trying to figure out how to search for a specific student by first name and then change their specific data and finally write it back out to the same file keeping all other data unchanged. I'm...
It does work if I reset "ok" after each do-while loop. Sometimes it helps asking the questions to figure out the answers I guess. Ha.
I'm trying to get this code to work but it will only ask for the first number to be entered again. Anytime the first number is below 10 or above 99 it will ask for the first number to be entered, but...
Haha wow I completely missed that. Thanks so much.
I'm new to java programming and I can't figure out how to get this program to do what I want. This is a basic lottery program that asks for 3 numbers between 10 and 99 and then generates three random...