fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.awt.*;
  4. import java.awt.image.*;
  5. import javax.imageio.*;
  6.  
  7.  
  8. class Main
  9. {
  10. public static void main (String[] args) throws java.lang.Exception {
  11.  
  12. int width = 100;
  13. int height = 100;
  14. BufferedImage bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
  15.  
  16. Graphics2D g = bufferedImage.createGraphics();
  17. g.setColor(Color.white);
  18. g.fillRect(0, 0, width, height);
  19. g.setColor(Color.black);
  20. g.fillOval(20, 67, 33, 33);
  21. g.fillOval(50, 67, 33, 33);
  22. g.fillOval(36, 10, 33, 66);
  23. g.setColor(Color.white);
  24. g.fillOval(51, 10, 3, 3);
  25.  
  26.  
  27. ImageIO.write(bufferedImage, "png", System.out);
  28. }
  29. }
Success #stdin #stdout 0.13s 248704KB
stdin
Standard input is empty
stdout

Standard output is empty