answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: Can a source file contain more than one class declaration?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which is the first non-comment statement in ajava program file?

It is most likely an "import Java. ...." statement. Which imports packages to be used in the source file. Or a class declaration "public class myClass { ".


What is the functions of file class?

file class contain methods or functions that handle various file stream operations.


Can a .java file contain more than one java classes?

Yes, it can. However, there can only be one public class per .java file, as public classes must have the same name as the source file.


What is the difference between exe and class files?

in .exe file it contains machine understandable code. but in .class file it contain only byte code which is not understadable by the microprocessor it will understud by the jvm only . we con't execute .class file without jvm . but we can execute .exe file without c-compiler .


Any algo is used for converting class file to java source file?

You need a decompiler to convert class files to java source files. JAD is a Java Decompiler that can do it for you.


Extension file for Java?

Java source files have the .java extension, compiled Java class files have the .class extension.


Why there are two numbers of classes in java class programmes?

A Java source code file can contain any number of classes. However, only one one of them can contain the main method which is called upon execution after compilation of the source code. However, this is a bad practice that needs to be avoided. Generally, one of those classes is the actual class while the other is a test class.


How do you make a java class?

You write the source code, in a text editor, or better in a special IDE. The source code should have the extension ".java". You can have several classes in the same file. Then you compile the class to bytecode; this creates a file with extension ".class".


What kind of file contain java source code?

'.java' files contain java source code. One can access these files on windows by using 'notepad'.


What is java file in java?

A java file contains the code you write. One java file contains one class so for example when I want to make a class called Person, the source code is saved in Person.java


Which header files contain declaration for the files input and output functions and the macros defined and that are used with file input and output functions?

stdio.h


What is the extension of a java byte code file?

.class is the extension of a java byte code file.