There is a substring() method call on line 39 where the value of the index is out of bounds/past the end of the String.
Look at the code on that line and see why: how long is the String & what is...
Type: Posts; User: Norm
There is a substring() method call on line 39 where the value of the index is out of bounds/past the end of the String.
Look at the code on that line and see why: how long is the String & what is...
When posting code please wrap your code with
<YOUR CODE HERE>
to get highlighting and preserve formatting.
How/where did you get the algorithm for the code in the hash() method?
What are the meanings for the constants: 53 and 96?
Execute the method with single letters from a to z and see what is...
Yes, that is what lexical means
So the outer layer needs the hash and the inner layer uses the natural lex order?
Are you asking if a word needs a different hashcode for each position it goes to in the container where you are storing it? I don't know the specific algorithm that you are trying to code for to be...
Can you explain the problem?
Make the class static.
If bst[k] is null, where do you assign any values to the elements of the bst array?
There are two steps in using an array of objects:
1) define the array
2) fill the array elements with instances...
What code is on line 244? What variables are used on that line? Which of those variables is null?
What variable is the table? Where is it defined?
What variable on line 244 is null? See post#2
Please post the full text of the error message.
That was a big waste of time. Posting code with so many errors.
Can you explain what the problem with the code is now?
For testing please put all the answers to the questions the code asks in...
Can you post the code that shows what you printed and the statement where the NPE occurs.
It normally takes a variable with a null value to create a NPE. Did you print ALL of the variables?
The...
Look at line 249 in the code and find which variable has the null value. Then backtrack in the code t see why that variable does not have a valid non-null value.
If you can't tell what variable is...