Color: equals(Object obj) : Color « java.awt « Java by API






Color: equals(Object obj)

  

import java.awt.Color;
public class Main {
  public static void main(String[] a) {
    Color myBlack = new Color(0, 0, 0); // Color black
    Color myWhite = new Color(255, 255, 255); // Color white
    System.out.println(myBlack.equals(myWhite));
  }
}

   
    
  








Related examples in the same category

1.Color.GRAY
2.Color.lightGray
3.Color.magenta
4.Color.pink
5.new Color(int r, int g, int b)
6.new Color(int rgb)
7.Color: getComponents(float[] compArray)
8.Color: getRGB()
9.Color: HSBtoRGB(float hue,float saturation,float brightness)
10.Color: RGBtoHSB(int r, int g, int b, float[] hsbvals)