Edited by noel222, 02 February 2012 - 08:53 AM.
18 replies to this topic
#1
Posted 02 February 2012 - 06:14 AM
Nevermind
|
|
|
#2
Posted 02 February 2012 - 06:48 AM
sum += current.placeIn();placeIn needs an amount.
public double placeIn([FONT=arial black][B][SIZE=3]double amount[/SIZE][/B][/FONT])
Nothing wrong with the bold part. What kind of exception is it?
#3
Posted 02 February 2012 - 07:14 AM
Quote
I am getting exception error, as well as a not applicable error.
#4
Posted 02 February 2012 - 07:20 AM
The error is a pointer error at the bold area and it says that the underlined area is not applicable.
#5
Posted 02 February 2012 - 07:23 AM
Are there any compiler errors? What you describe sounds like something the IDE is saying, not an error from the compiler.
#6
Posted 02 February 2012 - 07:30 AM
No there is just a pointer exception at current.placein(3.0). I am assuming because I did not link the placein method correctly
#7
Posted 02 February 2012 - 07:31 AM
You get NullPointerExceptions when you try to use a variable with a null value. What value does current have?
#8
Posted 02 February 2012 - 07:34 AM
School.meanwhile(2.0) should set current to 2.0
#9
Posted 02 February 2012 - 07:39 AM
Quote
should set current to 2.0
What is the value of current at the line where the exception occurs.
Add a println to print out the value of current just before the line where the exception occurs.
#10
Posted 02 February 2012 - 07:43 AM
That is the value of current in the array. I checked their. I am really just having a problem adding the placein calendar to current and then returning the total value. Is there something wrong with myforloop for my array or is my placein method nt written correctly to use that placing(3.0)
#11
Posted 02 February 2012 - 07:47 AM
I thought you were getting a NullPointerException.
What errors are you getting when you execute the program?
Please copy and paste here the full text of the error messages.
If you are not getting exceptions when you execute the program, can you show the program's output, explain what is wrong with it and show what it should be?
What errors are you getting when you execute the program?
Please copy and paste here the full text of the error messages.
If you are not getting exceptions when you execute the program, can you show the program's output, explain what is wrong with it and show what it should be?
#12
Posted 02 February 2012 - 08:07 AM
nevermind
Edited by noel222, 23 February 2012 - 03:28 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









