Why only one Class is public in one file? Explain in
details. Thanks in Advance.

Answer Posted / janardhan

In an aplication public class is main class with main()
method as entry point

java compiler allows only one public class in file

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What java is used for?

664


What is the difference between Grid and Gridbaglayout?

587


Explain the features of java?

597


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

572


How do you sort an array in java?

543






What is difference between arraylist and list in java?

588


What happens if we override private method?

531


What type of language is java?

548


Is array a class in java?

509


Is java 9 released?

528


What are constructors in java?

574


What are the important methods of java exception class?

576


Is minecraft java edition free?

578


What is the file type?

561


make a method which any number and any type of argument and print sum of that arguments.....

1386