Submitted by c-admin on Mon, 05/27/2019 - 22:23
Which method declarations will enable a class to be run as a standalone program?
Select 2 options
A. static void main(String args[ ])
B. public void static main(String args[ ])
C. public static main(String[ ] argv)
D. final public static void main(String [ ] array)
E. public static void main(String args[ ])
Submitted by c-admin on Mon, 05/27/2019 - 22:21
Given the following class, which of these are valid ways of referring to the class from outside of the package com.enthu?
package com.enthu;
public class Base{
// ....
// lot of code...
}
Select 2 options
A. Base
B. By importing the package com.* and referring to the class as enthu.Base
C. importing com.* is illegal.
D. By importing com.enthu.* and referring to the class as Base.
E. By referring to the class as com.enthu.Base.
Submitted by c-admin on Mon, 05/27/2019 - 22:16
Which of the following are valid identifiers?
Select 2 options
A. class
B. $value$
C. angstrom
D. 2much
E. zer@
Submitted by c-admin on Mon, 05/27/2019 - 22:11
Which of the following keywords may occur multiple times in a Java source file?
Select 4 options
A. import
B. class
C. private
D. package
E. public
Submitted by c-admin on Mon, 05/27/2019 - 22:09
Identify valid modifiers for a top level class and method declarations.
(Assume that the class is not declared in another class)
Pages