Best Answer

Compile time error is any type of error that prevent a java program compile like a syntax error, a class not found, a bad file name for the defined class, a possible loss of precision when you are mixing different java data types and so on.

A runtime error means an error which happens, while the program is running. To deal with this kind of errors java define Exceptions. Exceptions are objects represents an abnormal condition in the flow of the program. It can be either checked or unchecked.

User Avatar

Wiki User

โˆ™ 2010-04-29 21:11:35
This answer is:
User Avatar
Study guides
See all Study Guides
Create a Study Guide

Add your answer:

Earn +20 pts
Q: Difference between run time error and compile time error in java?
Write your answer...
Related questions

What is the difference between run time and compile time in java?

Very simply, Java compile time is when Java is in the process of compiling source code, and run time is when Java is actually executing your program.

How compile time error arises in java?

'Compile time error' is when the compiler (javac) detects an error in your program.

What is the difference between javac and java commands?

javac compiler can be used for compile the program and java can be used for run the program.

It is not an error not to end a Java file name with the java extension?

If you want to compile a java program the name of that source code must end with extension .java

What is the difference between exception and error in java?

Error: Any departure from the expected behavior of the system or program, which stops the working of the system is an error. Exception:Any error or problem which one can handle and continue to work normally. Note that in Java a compile time error is normally called an "error," while a runtime error is called an "exception." Errors don't have subclasses while exception has two subclasses, they are compile time exception or checked exception (ClassNotFound Exception, IOException, SQLException etc.) and runtime or unchecked exception(ArrayIndexOutOfBounds Exception, NumberFormat Exception).

What do you get when you compile a java program?

When you compile a Java source file (.java) you get a Java bytecode file (.class). The bytecode in these .class files can be executed by the Java Virtual Machine.

Difference between run time error and run time exception in java?

Runtime Error Cannot be Rectified but Runtime Exception can.

How do you run and compile a java applet program?

One can run and compile a Java applet program by agreeing to the terms and downloading it. It is possible to get a compiler online that will compile and run Java programs.

How do you compile java programming language?

use the javac keyword to compile a Java program.javac is the syntax to compile a java file.

What is difference between java 2 and java?

there is no difference between java2 and java. its same.

Difference between a java complier and the Java JIT?

A java compiler takes Java source code and turns it into Java bytecode, which can then be run by the java virtual machine.Using JIT means that the java code will be compiled and executed at the time that you run the program, which will slow down the program because it has to compile the code at the same time that it runs.

How do you make software from a simple java program?

You compile it.You compile it.You compile it.You compile it.

Difference between Dynamic binding and message passing in java?

difference between inheritaens & pholimorephezem in java

How do you compile program in java?

java programs are compliled with the help of javac

What is the command to compile a java program named Greetingsjava?

The command to compile a Java program is "javac", followed by the class name (file name).

How do you compile java programs using windows vista text pad?

How can I compile java programs using windows vista text pad?

What is difference between java 2 and java 5?

They are different versions. Java 5 is newer than Java 2. Think of it like the difference between the Playstation 1 and the Playstation 3.

What is the Command to compile and execute a java program?

javac ^that will compile java ^that will execute

How do you compile servlet in java using tomcat?

Tomcat is a server. It is used to deploy and run Servlets and not compile them. A Servlet is a java file and has to be compiled just like any other Java Class.

Can an abstract method be declared static in java?

No, Java will fail to compile: "illegal combination of modifiers: abstract and static"This is a rather odd error, since Java does allow you to override static methods.

What is the difference between basic java and advanced java?

few diff is....

Can be used the programs in Java compiled under Windows XP with Windows 8.1?

It should work, yes. It really doesn't matter where you compile it - if you compile under Windows XP, you don't compile FOR Windows XP; rather, you compile for the virtual machine, which is compatible in different environments.

How can you compile or run the java programming?

To compile:javac MyProgram.javaTo run:java MyProgramHowever, you can also do everything (both compile and run) from within an IDE.

Major difference between c and java?

Java is object oriented, C is not...

What is the difference between coffee and java?

Nothing, java is another name for coffee.