Reputation: 49
I am extremely new to coding (today marks day one of my official journey to become a proficient Java coder).
I am curious as to why there are different colors for different tasks within the Java language. What does each text color signify?
I feel as if this is a simple question I just don't know it.
n/a
public class Pong extends JFrame {
(red) (cyan)(Green)(red) (green)
Upvotes: 3
Views: 2582
Reputation: 55
the code styling is not related to language itself, its more about the IDE you're using. for example in case of netbeans, have a look at this
Upvotes: 0
Reputation: 140533
I assume you are talking how an advanced editor/IDE uses different colors for different syntax elements.
If so: those are not properties of the languages. There is no standard that tells IDE developers to use this or that color schema. They simply decided to use this or that color for this or that syntax element.
Of course, most tools that do that ... the people creating them spend a lot of time to define coloring schemas that helps readers to read/understand source code quickly.
Upvotes: 1
Reputation: 1649
The colors mean nothing, it's just your IDE highlighting different keywords to make your code easier to read.
Upvotes: 1
Reputation: 2283
The colors have nothing to do with the language itself. They're used by your IDE (Integrated Development Environment, i.e. the program that you used to edit your code) to make the code more readable. There's no significance to the specific colors used, and the IDE will have options somewhere to change the coloring to whatever you like.
Upvotes: 9