I'm writing a game in Java. Is it bad practice to have a thing like

```
public class Constants
{
    public static Mouse mouse;
    public static Keyboard keyboard;
}

```

(Mouse and Keyboard are objects that return input)

Or would it be preferrable to have an object with these fields, passed to the objects that need them? 

Thanks.