Question: am writing a program in java on Linked List. I get an error when i use toString to return the IP address and PC of the code below.

```
package linked;

import java.net.InetAddress;

public class Work {
    private InetAddress IP;
    private String PC;

    public Work(InetAddress IP, String PC){
        this.IP=IP;
        this.PC=PC;
    } 
    public InetAddress getIP(){
        return IP;
    }
    public String getPC(){
        return PC;
    }
    @Override
    public String toString() {
        return IP + ' ' + PC;
    }
}

```

It comes up with an error in the `@Override` that says 

> 
> bad operand types for binary operator '+' first type: InetAddress  
> 
>  second type: char
> 
> 
>

Answer: 
```
// Get current time
const now = Date.now();
const futureDates = dates.filter(date => {
  // Filter out dates in the past or falsey values
  return date && (new Date(date)).getTime() > now;
});

// Do something with the result
console.log(futureDates.length);

```
Dates are the array in your example dates (as strings). Array has a filter method which executes a provided function for each date in your dates array. Then you check if that date has actually a value (not null), create new date to represent today date (dt) and date from the string in your array. Date.getTime() is a method that compares 'time ticks' and is a good way to compare two date objects. If your date is greater (in future) then today, that date is added into new array that filter function build based on this condition (futureDates) which, in the end, will contain only elements that are in future. 

```
var futureDates = dates.filter(function(date) {
   if(date) {
     var dt = new Date();
     var df = new Date(date);
     if(df.getTime() > dt.getTime())
       return df;
     }
});

```