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

Are true and false keywords?

1031


how are methods defined?

1065


Is singleton class thread safe?

1003


Is a method a procedure?

1062


Explain about exception propagation?

1045


What is bufferedwriter?

979


Explain about fail fast iterators in java?

1064


What is string pool in java?

1030


Is the empty set a singleton?

992


Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?

991


Is node a data type in java?

1013


What method is used to specify a container's layout in java programming?

1152


What is complexity in java?

1059


What does escaping a character mean?

1029


Why java uses the concept of the string literal?

1067