CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS J2EE JAVA DETAILS
Question :
How are Java source code files named?
Category Java Interview Questions
Rating (5.0) By 2 users
Added on 10/23/2004
Views 1421
Rate it!
Answers:

A Java source code file takes the name of a public class or interface that is defined within the file. A source code file may contain at most one public class or interface. If a public class or interface is defined within a source code file, then the source code file must take the name of the public class or interface. If no public class or interface is defined within asource code file, then the file must take on a name that is different than its classes and interfaces. Source code files use the .java extension.



if class is declared as public then source code file name must be same as class name.oterwise it will give compile time error.if class is no access specifier then file name may be same or different.A class can never be declared private/protected



 Posted by: subhasis mishra    

Contact subhasis mishra  Contact subhasis mishra


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
What is the relationship between the Canvas class and the Graphics class?
View Answer
What are the high-level thread states?
View Answer
What value does read() return when it has reached the end of a file?
View Answer
Can a Byte object be cast to a double value?
View Answer
What is the difference between a static and a non-static inner class?
View Answer
What is the difference between the String and StringBuffer classes?
View Answer
If a variable is declared as private, where may the variable be accessed?
View Answer
What is an object's lock and which object's have locks?
View Answer
What is the Dictionary class?
View Answer
How are the elements of a BorderLayout organized?
View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL Java Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/1121/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.62