aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes R long and Double literals? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "R long and Double literals?" Watch "R long and Double literals?" New topic
Author

R long and Double literals?

Shyam kumar
Ranch Hand

Joined: May 21, 2006
Posts: 146
Correct answers to the question below are 1 and 2.
Why statement 5 is incorrect?

Select the correct answers:
1.Array indexes in Java always start at 0.
2.An instance variable declared in a class is created when an instance of the class is created.
3.An instance variable declared in a class is created the first time an instance of the class is accessed.
4.When an object is created, any instance variables which have not been assigned a value remain undefined.
5. The double and long primitive types are also known as literals.
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
3.10 Literals

A literal is the source code representation of a value of a primitive type (�4.2), the String type (�4.3.3), or the null type (�4.1):
Literal:
IntegerLiteral
FloatingPointLiteral
BooleanLiteral
CharacterLiteral
StringLiteral
NullLiteral


An integer literal is of type long if it is suffixed with an ASCII letter L or l (ell); otherwise it is of type int (�4.2.1). The suffix L is preferred, because the letter l (ell) is often hard to distinguish from the digit 1 (one).
..
A floating-point literal is of type float if it is suffixed with an ASCII letter F or f; otherwise its type is double and it can optionally be suffixed with an ASCII letter D or d.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: R long and Double literals?
 
Similar Threads
Ques from Jxam
one question about casting
Where the variables are stored?
Implicit narrowing conversions
Sun Cirtification