The title roughly sums it up. Why can I not do this?
private void render() {
bs = window.getCanvas().getBufferStrategy();
if (bs == null) {
bs = window.getCanvas().createBufferStrategy(3); // this is the line with the error: cannot convert from void to BufferStrategy.
}
}
however I can do createBufferStrategy(3) with no variable. Why is this?