Search:

Type: Posts; User: Ouzi

Search: Search took 0.09 seconds.

  1. Replies
    14
    Views
    1,789

    [SOLVED] Re: Getting a null pointer exception.

    Ah, my understanding was that the && operator checks if the first condition is true, then it doesn't evaluate the other. But you and a friend of mine at university today, made it clear that this...
  2. Replies
    14
    Views
    1,789

    [SOLVED] Re: Getting a null pointer exception.

    First, thank you for your continuous support :) And also, I need to check both conditions that's why i was using the & operator.
  3. Replies
    14
    Views
    1,789

    [SOLVED] Re: Getting a null pointer exception.

    public class Message
    {
    String sender;
    String receiver;
    String subject;
    String body;
    static boolean flag = false;

    public Message(String sender, String receiver, String subject, String...
  4. Replies
    14
    Views
    1,789

    [SOLVED] Re: Getting a null pointer exception.

    That's the only thing I have changed, the code isn't working 100% as intended, still trying to figure out why ... Thing is, the method isValid() should check if the variable is empty or not, if its...
  5. Replies
    14
    Views
    1,789

    [SOLVED] Re: Getting a null pointer exception.

    Thank you so much for this, I will take that into consideration if I ever face a NPE. However when I updated the isValid() method, the exception was gone, which is weird. I used the same technique...
  6. Replies
    14
    Views
    1,789

    [SOLVED] Re: Getting a null pointer exception.

    Yeah, I understand that a null pointer exception is that when I try to invoke a method on a non-existing object, but I created my object, and when I output it, it works ...
    Nevermind, I changed that...
  7. Replies
    14
    Views
    1,789

    [SOLVED] Getting a null pointer exception.

    Okay, I'm still learning programming, and I have this assignment where I have to create a class Message, which 4 instance variables: sender, receiver, subject and body. I have to implement a...
Results 1 to 7 of 7