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

can two class in a code be public??if yes then how??

Answer Posted / siva

NO only one class should be public if we write multiple
classes in a same file.we can write multiple class files in
a single file.if main() is there in one of the classes then
it should be declare as public.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a static method be overridden in java?

1059


What is ++ a in java?

1032


What are the super most classes for all the streams?

2687


What is the basic concepts of OOPS?

1245


What is the purpose of checked and unchecked exceptions in JAVA?

1066


What is data structure in java?

1039


How can we break singleton in java?

1018


Explain about method local inner classes or local inner classes in java?

1069


What is difference between jdk,jre and jvm?

1186


What are the differences between heap and stack memory in java?

1105


What are the features in java?

1122


Are generics important java?

1037


What is the SimpleTimeZone class?

2332


What is defined as false sharing in the context of multithreading?

1085


Can a class with private constructor be extended?

1001