HowToDoInJava

  • Java 8
  • Regex
  • Concurrency
  • Best Practices
  • Spring Boot
  • JUnit5
  • Interview Questions
  • Dark Mode

Java Tutorials

“Core Java” is Sun’s term, used to refer to Java SE, the standard edition and a set of related technologies, like the Java VM, CORBA, etc. This is mostly to differentiate from others like Java ME or Java EE. “Core Java” is Oracle’s definition and refers to subset of Java SE technologies.

The Core Java technologies and application programming interfaces (APIs) are the foundation of the Java Platform, Standard Edition (Java SE). They are used in all classes of Java programming, from desktop applications to Java EE applications.

  1. Java UUID Generator Example
  2. Pairs in Java
  3. Java 8 – Parse string to date-time in UTC
  4. Java 8 ResolverStyle.STRICT
  5. Java DelayQueue
  6. ExecutorService – shutdown(), shutdownNow() and awaitTermination​()
  7. ExecutorService – Cancel a task in executor
  8. ScheduledExecutorService – Running task in executor after delay
  9. ExecutorService invokeAll()
  10. ExecutorService invokeAny()
  11. Callable Future Example
  12. Executor RejectedExecutionHandler
  13. ExecutorService in Java
  14. Compare LocalDateTime instances
  15. Compare LocalDate instances
  16. A Guide to AtomicInteger in Java
  17. Format date/timestamp in 12 hours pattern
  18. LocalDate format() API
  19. Java – Check given year is leap year or not?
  20. Compare ZonedDateTime in Java 8
  21. Format ZonedDateTime to String in Java 8
  22. Convert between LocalDate and ZonedDateTime
  23. Java 8 – Convert between LocalDateTime and LocalDate
  24. ZonedDateTime parse()
  25. LocalDateTime parse()
  26. LocalDate parse()
  27. Java ZonedDateTime class
  28. Java LocalDateTime class
  29. Java LocalTime class
  30. Java LocalDate class
  31. Java command line arguments
  32. A Guide to Recursion in Java
  33. Java Naming Conventions
  34. Difference between this and super in Java
  35. strictfp modifier in Java
  36. Difference between final, finally and finalize in Java
  37. Java throw and throws keywords
  38. Java synchronized keyword
  39. Java try catch finally blocks
  40. Java boolean keyword
  41. Java assert keyword – assertion in Java
  42. Java abstract keyword – abstract classes and methods
  43. Java Control Flow Statements
  44. Java CopyOnWriteArraySet class
  45. Java CopyOnWriteArrayList class
  46. Java TransferQueue – Java LinkedTransferQueue class
  47. Java ArrayBlockingQueue class
  48. Java PriorityBlockingQueue class
  49. Java PriorityQueue class
  50. Java Spliterator interface
  51. Java ListIterator interface
  52. Java Iterator interface example
  53. Java Comparator interface example
  54. Java Comparable interface example
  55. Java LinkedList class
  56. Java TreeSet class
  57. Java LinkedHashSet class
  58. Java HashSet class
  59. Java Hashtable class
  60. Java TreeMap class
  61. Java LinkedHashMap class
  62. How to clone HashMap – Shallow and Deep Copy
  63. How to remove duplicate elements in ArrayList
  64. How to Synchronize HashMap in Java
  65. How to join or merge two hashmaps in Java
  66. How to compare two hashmaps in Java
  67. ArrayList spliterator() method example
  68. ArrayList removeIf() – remove objects by field
  69. ArrayList sort() – Sort list of objects by field
  70. ArrayList replaceAll() method example
  71. ArrayList retainAll() method example
  72. ArrayList removeAll() – remove all occurrences from list
  73. ArrayList remove() method example
  74. ArrayList listIterator() method example
  75. ArrayList forEach() example – Java 8
  76. ArrayList clone() – ArrayList deep copy and shallow copy
  77. ArrayList clear() – Empty ArrayList in Java
  78. ArrayList addAll() method example
  79. Java tuple – Working with tuples in Java
  80. ArrayList add() method example
  81. Difference between LinkedList vs ArrayList in Java
  82. Difference between ArrayList vs Vector in Java
  83. How to convert HashSet to ArrayList in Java
  84. Convert array to list in Java
  85. How to convert ArrayList to String Array in Java
  86. How to convert LinkedList to ArrayList in Java
  87. How to convert Vector to ArrayList in Java
  88. Java ArrayList toArray() – Convert ArrayList to Array
  89. Java ArrayList contains() – Check if element exists
  90. Java ArrayList ensureCapacity() method example
  91. How to replace existing element in ArrayList
  92. Check if ArrayList is empty or not in Java
  93. Java format string to phone number with dashes – (123) 456-6789 pattern
  94. Get first 4 characters of String in Java
  95. Get last 4 characters of String in Java
  96. How to empty or clear ArrayList in Java
  97. How to merge two ArrayLists in Java
  98. How to serialize and deserialize ArrayList in Java
  99. How to swap two elements in ArrayList in Java
  100. How to synchronize ArrayList in Java
  101. How to compare two ArrayLists in Java
  102. ArrayList get() method – Get element at index from ArrayList
  103. Arraylist indexOf() – Get index of element in arraylist
  104. Arraylist lastIndexOf() – Get last index of element in arraylist in Java
  105. Get sublist of ArrayList – ArrayList subList() method
  106. Add multiple items to ArrayList in Java
  107. How to remove element from ArrayList in Java
  108. ArrayList add/replace element at specified index in Java
  109. How to iterate through ArrayList of objects in Java
  110. How to initialize ArrayList in Java
  111. Java String intern() method example
  112. Java String contains() method example
  113. Java String toLowerCase() method example
  114. Java String toUpperCase() method example
  115. Java String split() method example
  116. Java String replaceAll() method example
  117. Java String replaceFirst() method example
  118. Java String replace() method example
  119. Java String concat() method example
  120. Java String substring() method example
  121. Java String lastIndexOf() method example
  122. Java String indexOf() method example
  123. Java String hashCode() method example
  124. Java String endsWith() method example
  125. Java String startsWith() example
  126. Java String compareToIgnoreCase() method example
  127. Java String compareTo() method example
  128. Java String equalsIgnoreCase() method – Case-insensitive comparison
  129. Java String equals() method – Java compare strings
  130. Java String charAt() method example
  131. Java – Find duplicate characters in String
  132. Java hashCode() and equals() – Contract, rules and best practices
  133. Java convert float to String – Format to N decimal points
  134. Java StackTrace to String Example
  135. Java – Right pad a string with spaces or zeros
  136. Java – Left pad a string with spaces or zeros
  137. Java 8 StringJoiner Example
  138. Java remove extra white spaces between words in String
  139. Java remove leading whitespaces from String
  140. Java remove trailing whitespaces from String
  141. Java reverse string using recursion
  142. Reverse words in string in Java
  143. Convert long to String in Java
  144. Convert String to Long in Java
  145. Convert int to String in Java
  146. Java wrapper classes – autoboxing, unboxing and conversion examples
  147. Convert String to Title Case in Java
  148. Java Unescape HTML to String Example
  149. Java Escape HTML – Encode String to HTML Example
  150. Duration or difference between two dates
  151. Java 8 DateTimeFormatter
  152. Convert between LocalDate to java.sql.Date
  153. Convert between LocalTime to java.sql.Time
  154. Convert Date to LocalDate and back
  155. Convert between LocalDateTime to Date
  156. Convert between LocalDateTime to ZonedDateTime
  157. Java timezone conversion example
  158. Java add days to Date and LocalDateTime
  159. Java format LocalDateTime to String
  160. Java – Measure elapsed time
  161. Java Convert String to LocalDate
  162. Java parse String to Date
  163. Java – Get Current Timestamp
  164. Java – How to compare dates
  165. Java convert date to EST/EDT timezone
  166. Create List with Single Element
  167. Java – Append to File
  168. Java – Write to File
  169. Java Comments
  170. Java variables
  171. What is Java JDK, JRE and JVM – In-depth Analysis
  172. Java Garbage Collection Algorithms [till Java 9]
  173. Java – Read typesafe input using Scanner class
  174. Correct way to compare floats or doubles in Java
  175. Java Static – Variable, Method, Block, Class and Import Statement
  176. Java Read File to String [Updated for Java 8]
  177. Convert Java String to int
  178. Java enum with string values
  179. Java Split CSV String – Convert String to List Example
  180. Java custom serialization using readObject and writeObject
  181. Convert XMLGregorianCalendar to date time – Format to string
  182. Format XMLGregorianCalendar to ‘MM/dd/yyyy hh:mm a z’ pattern
  183. Java Iterate List Examples
  184. Java – Convert OutputStream to InputStream Example
  185. Java Locale – Create and Set Default Locale
  186. Java – Unzip File with Sub-directories
  187. Java – Get Current Working Directory Example
  188. Serialize Java Object to XML – XMLEncoder and XMLDecoder Example
  189. Difference between Externalizable vs Serializable in Java
  190. Java Externalizable Example – More Efficient Serialization
  191. Generate Random Numbers Example in Java
  192. Java classpath
  193. Read file from resources folder – Spring Example
  194. How to read file in java
  195. Producer Consumer Problem Using BlockingQueue
  196. Different ways to iterate over Collections in Java
  197. Binary, Octal, and Hexadecimal Conversions in Java
  198. Java Thread Life Cycle and Thread States
  199. Concurrency vs. Parallelism
  200. Java System Properties
  201. Java Date – parse, format and conversion
  202. Java – Get current date time
  203. Java Multi-threading Evolution and Topics
  204. Difference between lock and monitor – Java Concurrency
  205. Java 8 Difference Between Two Dates
  206. Is enum Really Best Singletons?
  207. Difference between enumerator and iterator?
  208. How Iterator works in java
  209. Java – Create Password Protected Zip File
  210. Left, right, or center align string in Java
  211. Static Import Declarations in Java
  212. Java create class – how to create objects?
  213. Continue keyword / statement in Java
  214. Java break keyword
  215. do-while loop in Java
  216. while loop in Java
  217. Java for-each loop | enhanced for-each loop example
  218. for loop in Java
  219. Switch Statement in Java
  220. if-else statement in Java
  221. What is Block Statement in Java
  222. Types of Statements in Java
  223. A guide to Java Operators
  224. Little-Endian and Big-Endian in Java
  225. Data Types in Java
  226. What is Java programming language?
  227. Primitive Data Types in Java
  228. ScheduledThreadPoolExecutor – Task Scheduling with Executors
  229. Java Callable Future Example
  230. Java Fixed Size Thread Pool Executor Example
  231. Java Thread Pool – ThreadPoolExecutor Example
  232. ConcurrentLinkedDeque Example – Non-blocking Thread-safe List
  233. How to Copy Directories in Java
  234. Generate SHA or MD5 file checksum hash in java
  235. Java Create Read Only File Example
  236. Java File Copy – 4 Ways to Copy Files in Java
  237. Java FilenameFilter Example – Find/delete files of certain extension
  238. Java – BufferedWriter
  239. Java BufferedReader Example
  240. Java – Create New File
  241. Control concurrent access to multiple copies of a resource using Semaphore
  242. How to work with wait(), notify() and notifyAll() in Java?
  243. Binary Semaphore Tutorial and Example
  244. How to Use Locks in Java | java.util.concurrent.locks.Lock Tutorial and Example
  245. Creating Threads Using java.util.concurrent.ThreadFactory
  246. Java ThreadLocal Variables – When and How to Use?
  247. How to Restart Thread Using UncaughtExceptionHandler
  248. How Java I/O Works Internally at Lower Level?
  249. Java – Delete Temporary File
  250. Java – Create Temporary File
  251. Java – Write to Temporary File
  252. How to check if file exists in Java
  253. Convert String to InputStream in Java
  254. Java read file to byte[] array
  255. Java – Read Write UTF-8 Encoded Data
  256. JVM Memory Model / Structure and Components
  257. Java – Read File Line by Line – LineNumberReader
  258. Java Read and Write Property File Example
  259. Java – Read console input
  260. Java FileFilter Example
  261. Location Based Currency Formatting in Java
  262. Java – Get Current User Locale
  263. How Deserialization Process Happen in Java?
  264. Java Generics PECS – Producer Extends Consumer Super
  265. Java transient keyword example
  266. Difference between 32-bit java vs. 64-bit java
  267. Complete Java Generics Tutorial
  268. Java Compare and Swap Example – CAS Algorithm
  269. Java Reflection – Real Usage Examples
  270. Complete Java Annotations Tutorial
  271. Difference between HashMap vs Hashtable in Java
  272. Convert Hex to ASCII and ASCII to Hex
  273. Java Concurrency – Difference between yield() and join()
  274. Java Concurrency – Thread Safety?
  275. Java split string – Java tokenize string examples
  276. Difference between java.exe and javaw.exe
  277. Java calculate age from date of birth
  278. Throttling Task Submission Rate with ThreadPoolExecutor and Semaphore
  279. Delete directory recursively in Java
  280. Java Standard IO vs. Java NIO
  281. JDBC Performance Optimization Tips
  282. Java JDBC PreparedStatement Example
  283. JDBC SQL DELETE Query Example
  284. JDBC SQL INSERT Query Example
  285. JDBC SELECT Query Example
  286. Java – JDBC Connection Example (MySQL)
  287. Java – JDBC Driver Types
  288. Java Checked vs Unchecked Exceptions
  289. Labeled Statements in Java
  290. Instanceof operators don’t need explicit null checks
  291. Checked exceptions thrown in initializer blocks can be declared by the constructors
  292. Usage of class sun.misc.Unsafe
  293. Java serialVersionUID – How to generate serialVersionUID
  294. Convert InputStream to String In Java
  295. Why Strings are Immutable in Java?
  296. Java View/Generate Bytecode of Class File
  297. Java concurrency – CountDownLatch Example
  298. Top 40 Java collection interview questions and answers
  299. Parse CSV files in java
  300. Java ConcurrentHashMap Best Practices
  301. [Solved] java.lang.IncompatibleClassChangeError: Implementing class
  302. How to design good custom key object for HashMap
  303. Java NullPointerException – How to effectively handle null pointer in Java
  304. Use Array instead of Vector.elementAt() for Better Performance
  305. Performance Comparison of Different Ways to Iterate over HashMap
  306. Always Use length() Instead of equals() to Check Empty String
  307. Performance Comparison – Different For Loops in Java
  308. Java executor framework tutorial and best practices
  309. Difference between Runnable vs Thread in Java
  310. Difference between sleep() and wait() in Java
  311. Object level lock vs Class level lock in Java
  312. Java Wrapper Classes Internal Caching
  313. Java Pass-by-Value vs. Pass-by-Reference
  314. Java Strict Date Validation – Java SimpleDateFormat setLenient() Method
  315. Java puzzle – Why try-catch-finally blocks require braces?
  316. Java enum
  317. Java synchronous and asynchronous exceptions
  318. Java deep copy using in-memory serialization
  319. Java Serialization – Dos and don’ts for correct serialization
  320. Java Double Brace Initialization
  321. Java Inter-thread Communication – PipedReader and PipedWriter
  322. Java Memory Management – Garbage Collection Algorithms
  323. Java Cloneable interface – Is it broken?
  324. How to Find Duplicate Words in String in Java
  325. Java clone – deep and shallow copy – copy constructors
  326. Java Custom Exceptions – Best Practices
  327. Java main() method
  328. finalize() Method in Java – Why you should not use it?
  329. How to create immutable class in Java
  330. Java String Interview Questions with Answers
  331. Java ThreadPoolExecutor and BlockingQueue Example
  332. Java Deadlock Example and Solution
  333. How HashMap works in Java

Search Tutorials

Popular Tutorials

  • Java 8 Tutorial
  • Core Java Tutorial
  • Collections in Java
  • Java Concurrency
  • Spring Boot Tutorial
  • Spring AOP Tutorial
  • Spring MVC Tutorial
  • Spring Security Tutorial
  • Hibernate Tutorial
  • Python Tutorial
  • Jersey Tutorial
  • Maven Tutorial
  • Log4j Tutorial
  • Regex Tutorial

Meta Links

  • Advertise
  • Contact Us
  • Privacy policy
  • About Me

Recommended Reading

  • 10 Life Lessons
  • Secure Hash Algorithms
  • How Web Servers work?
  • How Java I/O Works Internally?
  • Best Way to Learn Java
  • Java Best Practices Guide
  • Microservices Tutorial
  • REST API Tutorial
  • How to Start New Blog

Copyright © 2016 · HowToDoInjava.com · All Rights Reserved. | Sitemap