Skip to content

An exception occurred processing JSP page, array list

I’m not able to figure out this problem. My error: org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 28 java class: jsp: I’m not sure what I did wrong, but I think that it is something about the definition of the bean. I appreciate every attempt to hel…

Most efficient way to concatenate Strings

I was under the impression that StringBuffer is the fastest way to concatenate strings, but I saw this Stack Overflow post saying that concat() is the fastest method. I tried the 2 given examples in Java 1.5, 1.6 and 1.7 but I never got the results they did. My results are almost identical to this Can somebod…

Find 2D array max and min

This is the original prompt: Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMiles. Sample output for the given program: Here is my code: Here is the output: Your output: Your output: Expected output: Your output: Why is the last test…

CodeWars – Sum of odd Numbers – For loop

I have attempted to make a piece of code that accepts an input of “n”, calculates the sum of the numbers on the nth line an odd number triangle, which looks like: etc. So for n = 3, the sum would be 7 + 9 + 11 ie 27 I know that n is not only the line number but

Java repeated letter check in string

I’m having problem figuring out how to check from users input letters that were repeated. Program needs to output repeated letter as true and if there isn’t any then as false. Program should not count numbers or symbols as repeated. For example: User input: Chocolate Program Output: True User inpu…

Create child nodes using recursion

I’m trying to create a hierarchy from flat data. I have the following Node definition: Given this data: [Person,Manager,Hourly,New], where the tree should be like: I’ve tried the following: And my createNode method is: But conceptually I don’t understand how to maintain the structure if Java…