Search:

Type: Posts; User: Blinktwink

Search: Search took 0.10 seconds.

  1. Re: Map containsKey() giving Null Pointer Exception

    Oh wow I just realised that -.- I passed over it before because,

    private Map<String, Integer> wordFrequency = new Map<String, Integer>();

    wasn't working so I removed it to keep the compiler...
  2. Re: Map containsKey() giving Null Pointer Exception

    It is a field in the class, funny you should ask I was just looking at it...

    private Map<String, Integer> wordFrequency;
  3. Map containsKey() giving Null Pointer Exception

    Hi everyone I'm having an issue with my code that needs an urgent fix. I'll begin by slapping in my code.



    private void readTweetFile(String filename){
    try{
    Scanner input...
  4. Replies
    7
    Views
    1,134

    Re: Removing fractions from Integers

    2105
    Here's the finished product :)
  5. Replies
    7
    Views
    1,134

    Re: Removing fractions from Integers

    Oh wow I can't believe I didn't see what I was doing wrong. Feel like a right idiot now. It was so obvious yet somehow it eluded me, it always seems to be that way though. Thanks for the help this...
  6. Replies
    7
    Views
    1,134

    Re: Removing fractions from Integers

    i stands for index. ii is simply my second index for my nested loop. It's the incrementation of these which controls the loop. I understand that there is a syntax 'for each' that I haven't quite...
  7. Replies
    7
    Views
    1,134

    Re: Removing fractions from Integers

    Oh really? Thank you for that informative tidbit, must be another error in my code some where.

    --- Update ---

    Turns out I'm getting an "Array out of bounds exception" with this line.


    int b...
  8. Replies
    7
    Views
    1,134

    Removing fractions from Integers

    Sorry for the vague title it's 3:30 in the morning and I really want to get this done.

    My problem is that I am adding together two integers and dividing by two to find the average of them....
  9. Replies
    5
    Views
    1,311

    Re: Missing return statement???

    Yeah the issue was my 'return null;' had top be outside of the for loop which is now fixed :)
  10. Replies
    5
    Views
    1,311

    Re: Missing return statement???

    Thanks for the reply turns out I just had to shift my:

    "return null;"

    a couple of curly brackets down :)
  11. Replies
    5
    Views
    1,311

    Missing return statement???

    Hello everyone,

    Forgive me for any errors in posting this here or simply bad posting syntax,
    this is my first time posting here and probably won't be my last.


    public Person getPerson(String...
Results 1 to 11 of 11