Movatterモバイル変換


[0]ホーム

URL:


Menu
×
Sign In
+1 Get Certified For Teachers Spaces Plus Get Certified For Teachers Spaces Plus
   ❮     
     ❯   

Java Tutorial

Java HOMEJava IntroJava Get StartedJava SyntaxJava OutputJava CommentsJava VariablesJava Data TypesJava Type CastingJava OperatorsJava StringsJava MathJava BooleansJava If...ElseJava SwitchJava While LoopJava For LoopJava Break/ContinueJava Arrays

Java Methods

Java MethodsJava Method ParametersJava Method OverloadingJava ScopeJava Recursion

Java Classes

Java OOPJava Classes/ObjectsJava Class AttributesJava Class MethodsJava ConstructorsJava this KeywordJava ModifiersJava EncapsulationJava Packages / APIJava InheritanceJava PolymorphismJava super KeywordJava Inner ClassesJava AbstractionJava InterfaceJava EnumsJava User InputJava Date

Java Errors

Java ErrorsJava DebuggingJava Exceptions

Java File Handling

Java FilesJava Create/Write FilesJava Read FilesJava Delete Files

Java Data Structures

Java Data StructuresJava CollectionsJava ListJava ArrayListJava LinkedListJava List SortingJava SetJava HashSetJava TreeSetJava LinkedHashSetJava MapJava HashMapJava TreeMapJava LinkedHashMapJava Iterator

Java Advanced

Java Wrapper ClassesJava GenericsJava AnnotationsJava RegExJava ThreadsJava LambdaJava Advanced Sorting

Java How To's

Add Two NumbersCount WordsReverse a StringSum of Array ElementsConvert String to ArraySort an ArrayFind Array AverageFind Smallest ElementArrayList LoopHashMap LoopLoop Through an EnumArea of RectangleEven or Odd NumberPositive or NegativeSquare RootRandom Number

Java Reference

Java ReferenceJava KeywordsJava String MethodsJava Math MethodsJava Output MethodsJava Arrays MethodsJava ArrayList MethodsJava LinkedList MethodsJava HashMap MethodsJava Scanner MethodsJava Iterator MethodsJava Errors & Exceptions

Java Examples

Java ExamplesJava CompilerJava ExercisesJava QuizJava ServerJava SyllabusJava Study PlanJava Certificate


JavaErrors and Exception Types


Errors and Exception Types

The table below shows a list of commonError andException types in Java:

Error/ExceptionDescription
ArithmeticErrorOccurs when a numeric calculation goes wrong
ArrayIndexOutOfBoundsExceptionOccurs when trying to access an index number that does not exist in an array
ClassFormatErrorOccurs when a class file cannot be accessed
ClassNotFoundExceptionOccurs when trying to access a class that does not exist
ConcurrentModificationExceptionOccurs when an element is added or removed from iterables
FileNotFoundExceptionOccurs when a file cannot be accessed
IncompatibleClassChangeErrorOccurs when there's been a change in a base class after a child class has already been initialized
InputMismatchExceptionOccurs when entering wrong input (e.g. text in a numerical input)
InterruptedExceptionOccurs when a Thread is interrupted while waiting/sleeping
InvalidClassExceptionOccurs when the Serialization runtime observes a problem with a class
IOExceptionOccurs when an input or output operation fails
NegativeArraySizeExceptionOccurs when trying to create an array with negative size
NoClassDefFoundErrorOccurs when the class is not found at runtime
NoSuchFieldExceptionOccurs when trying to access a class field/variable that does not exist
NoSuchMethodExceptionOccurs when trying to access a class method that does not exist
NullPointerExceptionOccurs when trying to access an object referece that isnull
NumberFormatExceptionOccurs when it is not possible to convert a specified string to a numeric type
RuntimeExceptionOccurs when an exception occurs at runtime
StringIndexOutOfBoundsExceptionOccurs when trying to access a character in a String that does not exist
TypeNotPresentExceptionOccurs when a type cannot be found
IllegalArgumentExceptionOccurs when when an illegal argument is passed to a method
IllegalStateExceptionOccurs when when a method is called at an illegal time


 
Track your progress - it's free!
 

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted ourterms of use,cookie and privacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved.W3Schools is Powered by W3.CSS.


[8]ページ先頭

©2009-2025 Movatter.jp