Join String Array in Java with Comma or Any Separator
Join String array in Java with String.join(), Collectors.joining() and StringJoiner, handle null and empty values, and join int arrays.
“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.
Join String array in Java with String.join(), Collectors.joining() and StringJoiner, handle null and empty values, and join int arrays.
A current REST API security checklist with OAuth 2.1, JWT validation, TLS, authorization checks, input validation, rate limiting and OWASP API Top 10.
Concurrency vs parallelism explained with Java 25 examples, a timeline diagram, the four combinations and which Java API fits waiting or CPU-bound tasks.
Java system properties in Java 25 with the standard key list, System.getProperty with defaults, -D options, setProperty and environment variables.
Get the current date and time in Java with LocalDate, LocalDateTime, ZonedDateTime and Instant now(), in any time zone, formatted and testable.
Find the difference between two dates in Java in years, months, days, hours and minutes with Period, Duration and ChronoUnit, including DST cases.
Check if a string contains all alphabets in Java with a boolean array, bitmask, streams and regex, list the missing letters and avoid the Unicode traps.
Remove consecutive duplicate characters in Java to turn a bad string into a good one, with a StringBuilder loop, a correct regex, a stack variant and FAQs.
Multiple inheritance in Java with interfaces and default methods, the three rules that resolve the diamond problem, and composition as an option.
Jsoup tutorial for Java 25 with jsoup 1.23.2 covering HTML parsing, CSS selectors and XPath, editing, Safelist cleaning and polite web scraping.
Create a password protected zip in Java with Zip4j 2.11 and AES-256, extract it with the password, handle a wrong password and pick AES over ZipCrypto.
Set Windows environment variables without admin rights using the account dialog, setx or PowerShell, and fix JAVA_HOME and Path for Java on locked laptops.
Learn to align a string in Java to the left, right or center with String.format(), a repeat() helper for centering, StringUtils and word-wrapped text.
Static import in Java explained with single and on-demand forms, name clash and shadowing rules, JUnit examples, best practices and Java 25 compact files.
Java access modifiers with examples and a table. Learn private, package-private, protected and public, the protected trap, overriding rules and modules.
Learn the difference between a Java class and object, how to write a class, create objects with new, the initialization order and the kinds of classes.
Learn the Java continue statement in for, while and do-while loops, guard clauses, the while loop trap, switch, forEach lambdas and labeled continue.
Learn the Java break statement in for, while and do-while loops and switch, how to exit nested loops, compile errors, finally and stream alternatives.
Learn the Java do while loop with examples, the trailing semicolon, input validation, the continue trap, compareAndSet retries and do-while vs while.
Learn the Java while loop with examples for reading input, iterators and queues, infinite loops, while vs for vs do-while, and a payment retry example.
Learn the Java for-each loop over arrays, lists, sets and maps, why the loop variable is a copy, safe removal, custom Iterable classes and reverse order.
Learn the Java for loop with its execution order, counting down, steps, two variables, nested loops, batches and the mistakes that cause wrong results.
Learn the Java switch statement with fall-through, allowed types, arrow labels, case null, pattern labels and how it differs from switch expressions.
Learn the Java if-else statement with else-if chains, nested if, the dangling else, instanceof patterns, guard clauses and ternary alternatives.
A block statement in Java groups statements in braces. Learn block scope, the missing-brace bug, static and instance initializer blocks and labels.
Every type of statement in Java with a short example: declaration, expression, control flow, jump, block, empty, try, synchronized, labeled and assert statements, plus switch expressions, yield and pattern matching in switch.
Operators in Java with examples for arithmetic, logical, bitwise, assignment and instanceof operators, plus the precedence table and common traps.
Little endian vs big endian explained for Java developers. See Java’s default byte order and read little-endian data with ByteBuffer and reverseBytes().
Data types in Java with examples covering the 8 primitive types, sizes and ranges, reference types, literals, wrapper classes and choosing a type.
Introduction to Java programming language covering bytecode and the JVM, JDK vs JRE, Java 25 LTS, versions, features, uses and a first program to run.
Java has eight primitive data types that hold plain values, not object references. Sizes, ranges, defaults, literals, overflow, floating-point precision, casting rules and wrapper classes, with tested Java 25 examples.
Callable and Future in Java with runnable examples of get() with timeout, exceptions, cancel(), Java 19 state() and resultNow(), and FutureTask.
Java thread pool guide with Executors factory pools, a fixed size pool example, ThreadPoolExecutor settings, pool sizing, monitoring and virtual threads.
Learn how Java ConcurrentLinkedDeque works, with lock-free methods for both ends, a 100-thread example, size() limits, work stealing and deque comparison.
Fix javax.servlet.http.HttpServlet was not found on the Java Build Path in Eclipse with the servlet API or Tomcat runtime, plus the Tomcat 11 jakarta fix.
Copy a directory recursively in Java with Files.walk() and Files.copy(), merge into existing folders, keep timestamps, filter files and copy links.
Java file checksum examples for MD5 and SHA-256 with MessageDigest, streaming for large files, HexFormat, Guava, Commons Codec and verifying downloads.
Make a file read-only in Java with setReadOnly(), POSIX permissions or the DOS attribute, make it writable again and see what read-only does not stop.
Learn to copy a file in Java with Files.copy(), overwrite with REPLACE_EXISTING, keep timestamps, copy streams and avoid half-written copies.
Java FilenameFilter examples to find files by extension, prefix or regex with list() and listFiles(), plus glob patterns with PathMatcher.
Java BufferedReader examples for readLine(), lines(), mark and reset, buffer size and console input, plus LineNumberReader for line numbers in errors.
Java create new file examples with Files.createFile(), parent folders, CREATE_NEW writes and permissions, and how to avoid overwriting existing files.
FileChannel transferTo() and transferFrom() examples. Copy and merge files, send a file to a socket, save streams, and loop past the 2 GB per-call limit.
Java MappedByteBuffer guide. Map files with FileChannel.map(), read and write mapped memory, call force(), and map files over 2 GB with MemorySegment.
Java NIO channel tutorial for Java 25. Open FileChannel and SocketChannel, read and write with ByteBuffer, use non-blocking mode and scatter/gather I/O.
Java NIO buffer tutorial. Learn position, limit and capacity, flip(), clear(), compact(), mark(), slices, direct buffers and byte order with ByteBuffer.
Java Semaphore explained with examples for acquire(), release(), tryAcquire() timeouts, fairness, throttling an executor and limiting virtual threads.
Java wait notify explained with wait(), notify() and notifyAll(), a bounded producer consumer queue, spurious wakeups and BlockingQueue.
A Java binary semaphore is a Semaphore(1). Learn how it works, when to use it, how it differs from a mutex, signaling and the over-release bug.
Use a Java Lock to let one thread at a time change shared data. Covers ReentrantLock with try-finally, tryLock() with a timeout, fair locks, ReadWriteLock, StampedLock, Condition and virtual threads.
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.