Java & JavaScript Color Quiz Test Your Java & JavaScript Skills: Beginner’s Quiz 1 / 5 In Java, which class is commonly used to represent colors in GUI applications? javax.swing.Color java.lang.Color java.util.Color java.awt.Color 2 / 5 Which of the following is a valid way to set a color in JavaScript? element.color = “red” element.style.textColor = “red” setColor(“red”) element.style.color = “red” 3 / 5 Which JavaScript property is used to change the text color of an element? backgroundColor textColor color fontColor 4 / 5 Which format can be used to define colors in JavaScript? Color names (“red”) Hex code (#FF0000) All of the above RGB (rgb(255,0,0)) 5 / 5 Which Java method is used to set color in GUI applications (like Swing)? changeColor() setTextColor() setColor() colorize() Your score isThe average score is 0% 0% Restart quiz Send feedback