Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Why to give the file name same as the public class name in
java?

Answer Posted / mahesh

First of all, it only has to be the same when the class is
public. And there is no explicit reason for that, it's just
a convention that came along with old versions of java and
people got used to it... They say it's because of the
limited capabilities of the compiler to compile
dependencies.

Is This Answer Correct ?    9 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you reverse a string in java without using string buffer?

1039


What does this mean java?

1029


What all methods are used to prevent thread execution ?

963


How arrays are stored in memory in java?

922


Name some OOPS Concepts in Java?

1019


What are the different types of sorting in java?

930


What is the relationship between clipping and repainting under awt?

1089


What is difference between throw and throws ?

1079


What is charat ()?

891


What are the differences between path and classpath variables?

977


Explain the concept of hashtables?

1058


What is difference between add() and addelement() in vector?

1483


Mention some interfaces implemented by linked list in java.

974


Differentiate between static and non-static methods in java.

996


What are java threads?

1063