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. catch
  2. finally
  3. throw
  4. throws
  5. 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!

Miscellaneous Java Articles

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