字母、下划线、美元符号和数字组成。并且第一个字母不能为数字字符。
2.If the property is a boolean, the getter method's prefix is either get or is. For example, getStopped() or isStopped() are both valid JavaBeans names for
3.The objective says you have to know legal identifiers only for variablenames, but the rules are the same for ALL Java components. So remember that a legal
JavaBeans standards, that indicate how a Java component should be named. In other words, you must be able to recognize that an identifier is legal even if it doesn’t conform to naming standards. If the exam question is asking about naming conventions—not just whether an identifier will compile—JavaBeans will be mentioned explicitly.]
4.Comments can appear at the beginning or end of any line in the source code file; they are independent of any of the positioning rules discussed here.
then the import statement(s) must be the first line(s) in the source code file. If there are no package or import statements, the class declaration must be
the first line in the source code file.
6.Files with no public classes can have a name that does not match any of theclasses in the file.
default access; the other two access control levels don't make sense for a class, as you'll see.
■ Create an instance of class B.
■ Extend class B (in other words, become a subclass of class B).
■ Access certain methods and variables within class B, depending on the access control of those methods and variables.
9. For the exam, you need to know only thats trictfp is a keyword and can be used to modify a class or a method, but never a
floating points used in the methods might behave in a platform-dependent way. If you don't declare a class as strictfp, you can still get strictfp behavior on a
method-by-method basis, by declaring a method as strictfp. If you don't know the IEEE 754 standard, now's not the time to learn it. You have, as we say, bigger fish to
fry.
a class Car that has generic methods common to all vehicles. But you don't want anyone actually creating a generic, abstract Car object. How would they initialize its
state? What color would it be? How many seats? Horsepower? All-wheel drive? Or more importantly, how would it behave? In other words, how would the methods be
implemented?