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

Do I need to import java.lang package any time? Why?

1309


What is a void method java?

907


What is the use of hashmap in java?

1022


What does this () mean in constructor chaining concept?

1052


What is the difference between char and char *?

1004


Difference between default and protected access specifiers?

1027


What is hashing principle in java?

967


What is mvc in java?

954


Which command from the jdk compiles a java program?

911


What will be the initial value of an object reference which is defined as an instance variable?

1075


What is a void method?

875


What are the string methods in java?

1023


How many bytes is a string in java?

925


What is polymorphism java example?

936


What must a class do to implement an interface in java programming?

963