GeekInterview.com
Series: Subject: Topic:
Question: 877 of 2110

In order for a source code file, containing the public class Test, to successfully compile, which of the following must be true?

A) It must have a package statement
B) It must be named Test.java
C) It must import java.lang
D) It must declare a public class named Test
Asked by: Interview Candidate | Asked on: Dec 10th, 2005
Showing Answers 1 - 4 of 4 Answers
sujatawankhede

Answered On : May 25th, 2006

View all answers by sujatawankhede

Hi, offcourse it is B.when file is complied ,it is save as .java extention...thanku....

  
Login to rate this answer.
zain

Answered On : Mar 6th, 2013

A) It must have a package statement

  
Login to rate this answer.
tien

Answered On : Jul 29th, 2014

C) It must import java.lang

  
Login to rate this answer.
Jitender Singal

Answered On : Sep 27th, 2014

D) it must declare a public class named test

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.