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...

Explain class A{}
class B{}
class C{}
all the three classes are saved in a single file name, what
the name should i provide to the file ,in what file name
should i run the program? Ple Explain

Answer Posted / sarabjit singh

when a code is to wriiten in a single file, no matter how
many number of classes being used, the de-facto standard
for naming the file is <ClassName>.java,
where <ClassName> is the name of the class containing the
main function().
Hence in our case, if class A is having the main() method,
then the file name would be A.java.

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain inheritance in java?

982


Can we make main() thread as daemon?

1098


What are heap memory and stack memory and what are memory tables.

981


Explain about static imports in java?

990


What do you understand by the term singleton?

992


Differentiate between static and non-static methods in java.

1040


Can a class be a super class and a sub-class at the same time? Give example.

1546


What is method overloading with type promotion?

1262


What does compareto () do in java?

989


What is toarray method in java?

1091


What is the parse method in java?

1117


What is jdbc api?

1002


What is a boolean output?

956


What is string builder?

885


Explain the difference between private, public, package and protected in java?

1037