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

What is multithreading in java?

1109


What is the inheritance?

1020


How does compareto work in java?

1097


What is the purpose of using break in each case of switch statement?

1068


How many bits is a string?

1058


what is object-oriented programming in java?

1104


In which language java is written?

1029


What is get () in java?

1109


What is an immutable class? How to create an immutable class?

1115


What is output buffer?

1093


Does constructor creates the object ?

1079


What are the two basic ways in which classes that can be run as threads may be defined?

1123


What are the types of java languages?

1036


Why put method is idempotent?

970


Why do we create public static method in java?

1160