Jump to content

Can Someone Please Help Me

- - - - -

  • Please log in to reply
18 replies to this topic

#1
noel222

noel222

    Newbie

  • Members
  • PipPip
  • 25 posts
Nevermind

Edited by noel222, 02 February 2012 - 08:53 AM.


#2
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
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
Norm

Norm

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 327 posts

Quote

I am getting exception error, as well as a not applicable error.
Please copy and paste here the full text of the error messages.

#4
noel222

noel222

    Newbie

  • Members
  • PipPip
  • 25 posts
The error is a pointer error at the bold area and it says that the underlined area is not applicable.

#5
Norm

Norm

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 327 posts
Are there any compiler errors? What you describe sounds like something the IDE is saying, not an error from the compiler.

#6
noel222

noel222

    Newbie

  • Members
  • PipPip
  • 25 posts
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
Norm

Norm

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 327 posts
You get NullPointerExceptions when you try to use a variable with a null value. What value does current have?

#8
noel222

noel222

    Newbie

  • Members
  • PipPip
  • 25 posts
School.meanwhile(2.0) should set current to 2.0

#9
Norm

Norm

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 327 posts

Quote

should set current to 2.0
That is what you want to happen, but what actually happens?
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
noel222

noel222

    Newbie

  • Members
  • PipPip
  • 25 posts
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
Norm

Norm

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 327 posts
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?

#12
noel222

noel222

    Newbie

  • Members
  • PipPip
  • 25 posts
nevermind

Edited by noel222, 23 February 2012 - 03:28 PM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users