ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
How are Java source code files named?
 Question Submitted By :: Bhanu
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How are Java source code files named?
Answer
# 1
A java source code file contains atmost one public class 
or interface defined with in the file.Java source code 
files takes the name of the public class or interface that 
is defined with in the source code file.If no public class 
or interface is  defined with in the source code file then 
file must take on a name that is different than its public 
class or interface.
 
Is This Answer Correct ?    1 Yes 0 No
Niranjanravi
 
  Re: How are Java source code files named?
Answer
# 2
java source code names will be named withthe name of the
class that is declare as publicwith .java extension
 
Is This Answer Correct ?    0 Yes 0 No
Ravikiran(aptech Mumbai)
 
 
 
  Re: How are Java source code files named?
Answer
# 3
If a  java source code file contain public class then the 
source code file name should be public class name other 
wise compiler error.


if a java source code does not contain  the public class 
then the name may be class name or anything ,not a problem.
 
Is This Answer Correct ?    0 Yes 0 No
Vijayakumar Chinnasamy
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Difference between ?System.out.println? and ?System.error.println?? Sai-Softech2
What is the difference between this() and super()? TCS11
class{ ... ... interface myinterface{ ... ... } abstract class{ .. .. } ... .. .. } is this possible to write "Interface and/ or Abstract class inside a class ? if possible whcich one is possible is only interface? is only abstract? Logica-CMG2
Can we declare variables inside a method as Final Variables?  3
What is the life cycle of an Applet ?  1
System.out.println(101/14) what is the output? a)6 b)14 c)7.14 d)0 Accenture6
Name the packages in JDK?  2
explain about jre and jvm  2
What is the difference between Resultset and Rowset. IBM5
After compilation of java program we'll get .class code. If it's generated in OS Windows XP will it work on OS Linux? If yes why? If no why? Aricent4
What is meant by event handling in SAX parser? Ness-Technologies1
how to handled exceptions & erros in ejb? Satyam1
which method throws exception of type Throwable  2
What is the smallest package in Java API?  4
What are the OOPS concepts in Java ? Satyam3
whats the diff between jsp and servlets? HCL9
what is multithreading? Virtusa4
String is a immutable objects . it means that string does not change........... But it will be chang......... { String s="kapil"; String s1="raj"; String s=s1; then print(.......) The String has been changed .. how it is possible and why its called immutable objects  3
what is the difference between static block and static method Huawei9
Is it possible to write static method in abstract class? justyfy your answer? Hexaware3
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com