abstract, boolean, break, byte, case, catch, char, class, const, continue, default, do, double, else, extends, false, final, finally, float, for, goto, if, implements, import, instanceof, int, interface, long, native, new, null, package, private, protected, public, return, short, static, super, switch, synchronized, this, throw, throws, transient, true, try, void, volatile, whileBack to the Top
As you may already know, most colors in HTML/CSS are represented by three values. One value represents red, another value represents green, and the final color represents blue. Each one of these can range from 0 to 255 inclusive (so there are 256 possibilities per color). To ease the load on the programmer, we convert these values into hexadecimal format. The actual conversion is beyond the scope of this website, but please visit the link below for information on how to exactly convert from decimal (the number system you are used to) to hexadecimal.
When facing a number such as #CC4499, we can get a vague intuition of
the color. The first two hex digits represent how much red is in the
color, the next two represent how much green, and the final two represent
how much blue is in the color. So, the color
#CC4499 is mostly red, with some green, and a large amount of blue.
The background color of this text is #CC4499
External Link: Hexadecimal Tutorial .
Back to the Top
You have seen, throughout the labs, many different method headers.
Understanding what the method headers actually mean is a very integral
part of Java programming. The method headers tell you exactly how to use
the method. Take, for example, the method header for the
trim() method in the String class.
public String trim()Just from that short method header, we have learned a lot about the method.
Stringclass, we must call the method on a string. For example:
String s = " Why hello there! "; String t = s.trim();
public static String valueOf(int i)
intas a parameter.
staticmodifier changes how we call the method. Since the method is
static, we call the method on the class. For example:
String s = String.valueOf(23);