answersLogoWhite

0

Why 2 files in java program?

Updated: 8/19/2019
User Avatar

Wiki User

8y ago

Best Answer

There are programming languages in which the source file is read and interpreted directly, but those are usually slower than when the program is compiled, to an EXE, or as in Java, for a virtual machine.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why 2 files in java program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Why are Java files important in programming?

Java files, containing source code, play a crucial role in development, compilation, packaging, maintenance, and version control.


How do you make an antivirus program using Java?

A running java program only has access to the memory allocated to it by the Java Runtime Environment. Java by design does not allow access to absolute memory locations which is required to scan for memory resident viruses. A Java-based anti-virus program can still read a virus-signature file and use it to scan for those patterns in files to identify possible infected files.


What is the default program to open a jar file to execute a program?

You can open jar files with command prompt, Winrar or java.


Header files in Java programming?

Java does not require header files like C/C++.


What is needed to run java?

You must have the Java Run-time Environment installed on your computer. Steps: 1. Open Command Prompt 2. Enter the command: javac class.java 3. Enter the command: java <classfilename> (without the .java or .class extension) The javac command will compile your java source file and create a class file. The java command will execute or run your java class file.


What do you get when you compile a java program?

The java interpreter or JVM (Java Virtual Machine) is not able to execute the java source code for a program. The java source code first needs to be compiled into bytecode that can be processed by JVM. Producing bytecode make the program platform independent as each platform has its own JVM. It is also possible to directly write bytecode, bypassing the need to compile, but that would be tedious job and also not good for security purpose as the compiler checks for various errors in a program.


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 are the Disadvantages in converting class files to java files?

The only reason to convert a .class file to a .java file would be to attempt to reverse engineer a piece of Java code. Disadvantages of this would include near-incomprehensible code being produced by the reverse engineering program.


What are the Names of header files in java?

Java doesn't use header files.


What is Commands for the compiler that are needed to compile and run your program?

javac is the command that is used to compile Java source files.


What are two main purposes of the Java compiler javac?

One of them is creating *.class from *.javaSecond is identifying syntax errors in the *.java files and intimating the programmer so that he can correct them


What kind of files contain java souce code?

Those files have the extension .java