top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

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

+2 votes
777 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
...