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