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...
Type: Posts; User: Ouzi
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...
First, thank you for your continuous support :) And also, I need to check both conditions that's why i was using the & operator.
public class Message
{
String sender;
String receiver;
String subject;
String body;
static boolean flag = false;
public Message(String sender, String receiver, String subject, String...
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...
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...
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...
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...