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 instance means in java?

1048


give an example for encapsulation?

1044


What are the parts of a method?

982


How do you sort in ascending order in java?

871


How do you declare an array in java?

1057


What is the size of arraylist in java?

1027


what invokes a threads run() method? : Java thread

1014


Can we restart a thread already started in java?

1103


How can a gui component handle its own events?

1113


What are the rules for naming an array?

1059


When do we need to use internal iteration? When do we need to use external iteration?

1125


Can we store variables in local blocks?

1351


How many bits are in a sentence?

1173


Can we define private and protected modifiers for the members in interfaces?

1097


What is difference between hashset and hashmap in java?

1015