Hey
Putting this code:
System.out.println("Hello");
BufferedImage bufferedImage = new BufferedImage(620, 420, BufferedImage.TYPE_INT_RGB);
System.out.println("Bye");
Graphics2D g2d = bufferedImage.createGraphics();
g2d.setColor(Color.black);
g2d.fillRect(0, 0, 620,420);
g2d.setColor(Color.yellow);
It throws a java.lang.OutOfMemoryError: Java heap space error not displaying the bye. I dont understand as my BufferedImage is nothing at all (simple 620 by 420).
Why is this happening?