Question: What is the difference between the >> and >>> operators?
Answer: The >> operator carries the sign bit when shifting right. The >>> zero-fills bits that have been shifted out.
Question: Is sizeof a keyword?
Answer: The sizeof operator is not a keyword.
Question: Does garbage collection guarantee that a program will not run out of memory?
Answer: Garbage collection does not guarantee that a program will not run out of memory. It is possible for programs to use up memory resources faster than they are garbage collected. It is also possible for programs to create objects that are not subject to garbage collection
Question: Can an object's finalize() method be invoked while it is reachable?
Answer: An object's finalize() method cannot be invoked by the garbage collector while the object is still reachable. However, an object's finalize() method may be invoked by other objects.
Question: What value does readLine() return when it has reached the end of a file?
Answer: The readLine() method returns null when it has reached the end of a file.
Question: Can a for statement loop indefinitely?
Answer: Yes, a for statement can loop indefinitely. For example, consider the following: for(;;) ;
Question: To what value is a variable of the String type automatically initialized?
Answer: The default value of an String type is null.
0 comments:
Post a Comment