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 to find the given number is a prime number or not by getting input from the user

1157


How can we create objects if we make the constructor private ?

1068


Can a function return a function?

1097


What is the difference between synchronized and synchronized block?

1106


What is the final class?

1128


List implementations of list interface?

1070


How do you replace a string in java?

1054


What is contractor means and methods?

1035


Explain the term virtual machine?

1089


How to solve the problem of generating the unique hash keys with hash function?

1951


What is a generic type?

1055


How much ram can a 64 bit processor theoretically?

964


What are the different ways of creating thread?

1061


Print Vertical traversal of a Binary Tree.

1064


Does sprintf allocate memory?

1165