answersLogoWhite

0


Best Answer

Java Exceptions inherit their getMessage and getLocalizedMessage methods from Throwable (see the related link). The difference is that subclasses should override getLocalizedMessage to provide a locale-specific message.

For example, imaging that you're adapting code from an American-English speaking company/group to a British-English group. You may want to create custom Exception classes which override the getLocalizedMessage to correct spelling and grammer to what the users and developers who will be using your code might expect. This can also be used for actual translations of Exception messages.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference between getmessage and getlocalizedmessage in exceptions Java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is difference between exception and error in java and explain using a program?

Error occurs at runtime and cannot be recovered, Outofmemory is one such example. Exceptions on the other hand are due conditions which the application encounters, that can be recovered such as FileNotFound exception or IO exceptions


What is the difference between an assembler and a translator?

what is the difference between an assembler and the translator


What is the difference between technology and process?

what is the difference between license and patent


What is the Difference between HVAC and AHU?

What is difference between hvac and ahu


What is difference between BE and BTech degrees?

no difference

Related questions

What is the true difference between a vegetable and a fruit?

The main difference is that fruits have seeds and vegies don't. However, there are exceptions. e.g cucumbers, eggplants, peppers etc.


What are the significant difference between organic and inorganic compound?

Basically, organic compounds have carbon. Inorganic do not (though there are some exceptions).


Where is teen on teen sex legal?

In most place it's legal if they are over 16, but there are exceptions and the difference between them can be important as well.


What are the fundamental difference between organic and inorganic chemicals in the body?

Basically, organic compounds have carbon. Inorganic do not (though there are some exceptions).


What is the difference between organic and inorganic compounds based on structure?

Basically, organic compounds have carbon. Inorganic do not (though there are some exceptions).


Difference between organic and inorganic in terms of general property?

In general, organic compounds are those compounds which contain carbon (with few exceptions). Inorganic compounds do not


What is difference between exception and error in java and explain using a program?

Error occurs at runtime and cannot be recovered, Outofmemory is one such example. Exceptions on the other hand are due conditions which the application encounters, that can be recovered such as FileNotFound exception or IO exceptions


Difference between checked and unchecked exception?

Checked exceptions are exceptions which need to be handled explicitly. These are the ones which require a try-catchblock or a throws keyword.Unchecked exceptions are exceptions which have no obligation to be handled. A NullPointerException is one common example.


What is the difference between the weight of a fifth grader and the weight of a professional football player?

Most fifth grade football players weigh between 60-120 pounds. Most NFL players weigh between 200 and 325. Of course there are exceptions.


What are similarities in baseball and softball rules?

That you have to use a bat and glove to be able to play.


What is the difference between organic and inorganic compaunds?

In general organic contains carbon molecules and/or those related to life. It is the chemistry of carbon containing compounds.Inorganic is everything else and generally do not contain carbon (with some exceptions).


What is difference between as on and as at?

difference between as on and as at