Answer: public class(2) : Questions « Java Source And Data Type « SCJP






C. 

A source code file must have the same name as public class or interface.








1.33.Questions
1.33.1.What is the printed double type value
1.33.2.Answer: double type member value
1.33.3.Can you force garbage collection of an object?
1.33.4.Answer: forced garbage collection
1.33.5.Can you call System.gc() to force a garbage collection of an object
1.33.6.Answer: using System.gc() to force a garbage collection
1.33.7.Which of the following are legal(double value declaration)?
1.33.8.Answer: double value declaration
1.33.9.Which of the following are legal(char variable declaration)?
1.33.10.Answer: char variable declaration
1.33.11.When will the null object be garbage collected.
1.33.12.Answer: readyness for garbage collection
1.33.13.Which of the following are true(method primitive type parameter)?
1.33.14.Answer: method primitive type parameter
1.33.15.Which of the following are true(parameters passing)?
1.33.16.Answer: parameters passing
1.33.17.In order for the public class MyClass to successfully compile?
1.33.18.Answer: public class
1.33.19.In order to successfully compile a source code file, containing the public class Test
1.33.20.Answer: public class(2)
1.33.21.In order for the MyClass to be compiled and run, which of the following must be true?
1.33.22.Answer: public class and runnable
1.33.23.A package statement must appear as the first non-blank(non-comments) line, if it is included in a source code file(True/False).
1.33.24.Answer: package statement
1.33.25.A public interface must have the same name as the source code file(True/False).
1.33.26.Answer: public interface
1.33.27.If an import statement must appear as the first non-blank(non-comment) line(True/False).
1.33.28.Answer: importing
1.33.29.What is the output(main method parameter)?
1.33.30.Answer: main method parameter index
1.33.31.Non-static field variables exist when the object is created and exist until the object is garbage collected(True/False).
1.33.32.Answer: static field and garbage collecting
1.33.33.Static field variables come into existence when the its class is loaded(True/False).
1.33.34.Answer: static field loading
1.33.35.Which of the following declare an array of String objects?
1.33.36.Answer: array declaration