top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Can we have multiple public classes in a java source file ?

+2 votes
118 views
Can we have multiple public classes in a java source file ?
posted Oct 29, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+2 votes

As far as I know we can’t have more than one public class in a single java source file, however a single source file can have multiple classes but can have only one public class.

answer Oct 30, 2014 by Salil Agrawal
0 votes

yes ,java sorce filemay contain many public classes.

answer Oct 29, 2014 by Dheeraj Kumar
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...