answersLogoWhite

0


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

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

> DO NOT LISTEN TO THE BELOW STEPS, PERFECT OPTIMIZER IS SPYWARE AND I SEE THIS SAME ANSWER BEING APPLIED TO MANY UNRELATED COMPUTER QUESTIONS!!!

because it is unchecked exception.and we don't know what type of exception occur in runtime

There are 3 step to repair runtime error

If you got runtime error then there is a 94% chance that your computer has registry problems. To repair runtime error you need to follow the steps below:

* Step 1 - Download a Perfect Optimizer,install this error repair tool.

* Step 2 - Click the Repair All Button.It will scan you PC for Free.

* Step 3 - Then click the Repair All Button again and your done! It is very easy to repair runtime error.

Here are the URL of Perfect Optimizer: http://www.fixerror365.com/tidpp-runtime_error-zz0005

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Java has a base Throwable class whose subclasses include Error and Exception. Exception has a special subclass called RuntimeException, which is the superclass of those exceptions that can be thrown during the normal operation of the JVM.

RuntimeException and its subclasses are unchecked exceptions. Unchecked exceptions do not need to be declared in a method or constructor's throws clause if they can be thrown by the execution of the method or constructor and propagate outside the method or constructor boundary. Runtime exceptions include IllegalArgumentException, NumberFormatException, NullPointerException, ClassCastException, and others.

As with RuntimeExceptions, all Errors are "runtime" in that methods are not required to declare in its throws clause any subclasses of Error that might be thrown during the execution of the method, but not caught, since these errors are abnormal conditions that should never occur.

The direct subclasses of Error include the following: AnnotationFormatError, AssertionError, AWTError, CoderMalfunctionError, FactoryConfigurationError, FactoryConfigurationError, IOError, LinkageError, ServiceConfigurationError, ThreadDeath, TransformerFactoryConfigurationError, VirtualMachineError.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

A Runtime error is a situation wherein the JVM encountered a state which caused it to crash.

For Ex: if i say

float f = x/y; with x and y being variables that get assigned at some point in the preceding lines of code, the system might throw an error if for some reason y remained 0.

You cant divide a number by 0 and hence this will cause a runtime error.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

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

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why runtime exceptions are not checked at compile time in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the purpose of claiming exceptions?

it informs compiler about its possible exceptions. For example,The purpose of Java exception is to tell the Java runtime system what can go wrong


What is dynamic method dispatch in java?

dynamic method dispatch is a technique by which a call to a overridden method is solved at runtime rather than compile time..this is how java implements runtime polymorphism.


Describe the JAVA throwable class hierarchy and types of exceptions?

In Java there are two main types of Exceptions. * Checked Exceptions - The ones that can be checked & handled in our code. Ex: I/O Exception, SQL Exception etc. In most cases, the compiler itself forces us to catch & handle these exceptions * Un-checked Exceptions - The ones that we cannot & should not handle in our code. Ex. Null Pointer Exception The java.lang.Throwable is the super class of all errors and exceptions in Java. Only objects of this class can be thrown & caught and handled by try-catch blocks. Ex: try { ..... ..... } catch (Exception e){ ... } finally { ... }


Is error and exception same?

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).


In order to write compile and execute java programs in my PC which software should i install?

Compilation (byte code conversion) and execution (interpretation) of JAVA programs requires a JAVA Compiler and a JAVA runtime. There are many JAVA development systems available, some free, some not free. Two vendors for the PC / Windows platform are Sun and Microsoft, but, again, there are others.

Related questions

What is the purpose of claiming exceptions?

it informs compiler about its possible exceptions. For example,The purpose of Java exception is to tell the Java runtime system what can go wrong


What is checked exception?

A compiler for the Java programming language checks, at compile time, that a program contains handlers for checked exceptions, by analyzing which checked exceptions can result from execution of a method or constructor. For each checked exception which is a possible result, the throws clause for the method or constructor must mention the class of that exception or one of the superclasses of the class of that exception. This compile-time checking for the presence of exception handlers is designed to reduce the number of exceptions which are not properly handled.


What are the types of exception in java?

Exceptions are of two types: checked exceptions and unchecked exceptions.


What is dynamic method dispatch in java?

dynamic method dispatch is a technique by which a call to a overridden method is solved at runtime rather than compile time..this is how java implements runtime polymorphism.


Describe the JAVA throwable class hierarchy and types of exceptions?

In Java there are two main types of Exceptions. * Checked Exceptions - The ones that can be checked & handled in our code. Ex: I/O Exception, SQL Exception etc. In most cases, the compiler itself forces us to catch & handle these exceptions * Un-checked Exceptions - The ones that we cannot & should not handle in our code. Ex. Null Pointer Exception The java.lang.Throwable is the super class of all errors and exceptions in Java. Only objects of this class can be thrown & caught and handled by try-catch blocks. Ex: try { ..... ..... } catch (Exception e){ ... } finally { ... }


What are tools or software that are needed to editcompile and run to java?

To edit Java source code you can use any text editor. In order to compile a Java source file to Java bytecode you need the Java Development Kit (JDK). The program which does this is called "javac" and can produce .class files which can be used by the Java Runtime Environment (JRE) to execute.


What is java's purpose on my PC?

Programs that are specifically designed with Java require a Java runtime to work on a computer. (In the case of Java, the runtime is called "Java Virtual Machine".) If you have any such program, you need to have Java.


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 make software from a simple java program?

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


Is error and exception same?

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).


In order to write compile and execute java programs in my PC which software should i install?

Compilation (byte code conversion) and execution (interpretation) of JAVA programs requires a JAVA Compiler and a JAVA runtime. There are many JAVA development systems available, some free, some not free. Two vendors for the PC / Windows platform are Sun and Microsoft, but, again, there are others.


Where can one download a java runtime environment?

The java runtime environment can be downloaded from several websites. Among them are Oracle, Java, CNET, Softsonic, Eclipse, AfterDawn, Soft32, and OldApps.