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

What is strings in java?

1049


How do you get the length of a string in java?

1010


Explain the difference between treeset and treemap in java?

976


What are the types of inner classes (non-static nested class) used in java?

1067


String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?

981


Give any two differences between C++ and java.

1150


Why do we need strings in java?

995


What are void pointers?

1313


Where can I find jdk in my computer?

966


Why string is not a wrapper class?

1187


What is a boolean expression in java?

1035


What is the purpose of void class?

1064


How hashmap works in java?

1051


What is the use of jtable?

1127


What is a nested structure?

1046