Java

Here's an index of all Java specific articles on Programming.Guide.

Java Arrays

  1. Java Arrays (with examples)
  2. Maximum length of array
  3. ArrayIndexOutOfBoundsException
  4. Arrays vs ArrayLists (and other Lists)
  5. Matrices and Multidimensional Arrays
  6. Appending to an array
  7. Copying an array
  8. Inserting an element in an array at a given index
  9. Testing array equality

Types in Java

  1. Java Basics: Types
  2. Primitive Types
  3. Primitives vs Objects and References
  4. Ranges of Primitive Types
  5. Wrapper Types
  6. Autoboxing and unboxing
  7. Boxed values and equality
  8. No byte or short literals?
  9. Byte (class) vs byte (primitive)
  10. Short (class) vs short (primitive)
  11. Integer vs int
  12. Long (class) vs long (primitive)
  13. Float (class) vs float (primitive)
  14. Double (class) vs double (primitive)
  15. Character vs char
  16. Boolean (class) vs boolean (primitive)

Java Keywords

  1. this
  2. catch
  3. finally
  4. throw
  5. throws
  6. try

Java Exceptions

  1. Throw, Try and Catch
  2. Java Exception Types
  3. Chained Exceptions
  4. Custom Exception
  5. Difference between Checked and Unchecked Exceptions
  6. Choosing between Checked and Unchecked Exceptions
  7. Checked Exceptions: Good or Bad?
  8. Return Values vs Exceptions
  9. try + finally
  10. try-with-resources
  11. Stack Traces
  12. Suppressed Exceptions
  13. throw vs throws vs Throwable
  14. List of Java Exceptions

Loops in Java

  1. while loop
  2. for loop
  3. for each loop
  4. do…while loop
  5. break
  6. continue
  7. Beware of accidental semicolons in while and for loops!

Unsigned integers in Java

  1. Unsigned byte
  2. Unsigned short
  3. Unsigned int
  4. Unsigned long
  5. Print an unsigned byte
  6. Parse an unsigned byte
  7. Convert unsigned byte to int
  8. Convert unsigned byte to long
  9. Convert unsigned byte to short
  10. Convert short to unsigned byte
  11. Convert int to unsigned byte
  12. Convert long to unsigned byte
  13. Compare unsigned bytes
  14. Print an unsigned short
  15. Parse an unsigned short
  16. Convert int to unsigned short
  17. Convert unsigned short to int
  18. Convert unsigned short to long
  19. Convert long to unsigned short
  20. Compare unsigned shorts
  21. Print an unsigned int
  22. Parse an unsigned int
  23. Convert unsigned int to long
  24. Convert long to unsigned int
  25. Compare unsigned ints
  26. Print an unsigned long
  27. Parse an unsigned long
  28. Convert BigInteger to unsigned long
  29. Convert unsigned long to BigInteger
  30. Compare unsigned longs

Miscellaneous Java Articles

  1. Why's Double.MIN_VALUE is positive? Integer.MIN_VALUE is negative!
  2. Is it wrong to use deprecated methods or classes?
  3. Convert from Number to long
  4. Converting a char to an int
  5. Opening a URL in Android's web browser from within application
  6. Java Stack Traces: Unknown Source
  7. Copying Objects
  8. Formatting byte size to human readable format
  9. Do interfaces inherit from Object?
  10. How does the assert keyword work?
  11. When to create a final class
  12. Creating a custom event
  13. Abstract interfaces and abstract interface methods
  14. Convert enum to and from string
  15. Generating a random number of a certain length
  16. Wrong results for division?
  17. Calling method of outer class from inner class
  18. Random with a random seed
  19. Initializing a multidimensional array
  20. Accessing private fields of superclass through reflection
  21. Switch Expression
  22. All Functional Interfaces
  23. Handling InterruptedException
  24. Drawing multiline strings with Graphics
  25. Convert from BigInteger to long
  26. Generating a random char (a-z)
  27. Removing a range of elements from a list
  28. Calling super.someMethod()
  29. Convert from BigDecimal to BigInteger
  30. Convert from BigInteger to short
  31. Java2D: Increasing line width
  32. Collections.emptyList vs new ArrayList
  33. 5 Java concepts explained: Overloading, overriding, shadowing, hiding, and obscuring
  34. Removing trailing comma from comma separated string
  35. Integers may overflow, but bytes may not?
  36. Where's the javadoc for values and valueOf methods on enums?!
  37. N-gram generation
  38. Switch on enum (with examples)
  39. Reading the Nth line from a file
  40. Convert from Number to short
  41. Calling super()
  42. How to split a String into an ArrayList
  43. Class.this explained
  44. ArrayIndexOutOfBoundsException in for loop
  45. Function Pointers in Java
  46. The meaning of 'this' (with examples)
  47. -Integer.MIN_VALUE == Integer.MIN_VALUE but -Byte.MIN_VALUE != Byte.MIN_VALUE
  48. Switch Statement
  49. Local methods (or submethods, or inner methods, or nested methods)
  50. Executing code in comments?!
  51. Calling a default interface method from implementing class
  52. Does Java use Pass-by-Value or Pass-by-Reference?
  53. Marker Interfaces
  54. Convert from BigInteger to int
  55. Why wait must be called in a synchronized block
  56. Remainder (modulo) operator with negative numbers
  57. What exactly is immutable?
  58. Passing a list as argument to a vararg method
  59. Convert enum to and from int
  60. Java Error: Generic array creation
  61. Java Variables (with examples)
  62. Ellipsizing strings
  63. Convert from BigInteger to byte
  64. Find number of regex matches in a String
  65. Functional Interfaces
  66. Double.MIN_VALUE vs Double.MIN_NORMAL
  67. Initialize list with zeroes
  68. Accessing private fields through reflection
  69. Print 2D Matrix
  70. Why you should always override hashCode when overriding equals
  71. <...> (less than/greater than) syntax
  72. AtomicInteger and equals / Comparable
  73. What is effectively final?
  74. Clone and Cloneable
  75. Float.MIN_VALUE vs Float.MIN_NORMAL
  76. The 'this' reference (with examples)
  77. Removing elements from multiple indexes in a list
  78. Convert from BigInteger to BigDecimal
  79. Finding the Nth occurrence of a substring in a String
  80. Pattern Matching for instanceof
  81. When should I override equals?
  82. Using C style macros in Java
  83. this(…) constructor call (with examples)
  84. Remove duplicate whitespace in strings
  85. Java Oddity: How an upcast can save the day
  86. Convert from Number to byte
  87. Difference between a.getClass() and A.class
  88. Convert from Number to int
  89. Generating a random String (password, booking reference, etc)
  90. Calling super method of outer class from inner class
  91. Lambda Cheat Sheet
  92. What does final mean, and are final variables always immutable?
  93. Why can I access private fields of other objects?
  94. Print null