Core Java
Core Java - OOP Concepts, Garbage Collection, Multi-threading, Collections Framework, Java 8 Features, Lambda Functions, Streams.
Difference between ExecutorService submit and execute method
Upasana | June 23, 2022 | 2 min read | 17 views
You should prefer to use submit() method because it gives more flexibility to the programmer in terms of execution control i.e. you can check status of task, cancel a task or get the results of task. Additionally a better exception handling is possible using submit().
Read ArticleGiven a collection of 1 million integers, all ranging between 1 to 9, sort them in Big O(n) time
Upasana | November 22, 2020 | 2 min read | 669 views | Java Coding Challenges algorithm-datastructures
This is a typical Integer Sorting problem with a constraint that the number range to sort is very limited in spite 1 million total entries. Integer Sorting with limited range is achieved efficiently with Bucket Sorting.
Read ArticleCRC32 checksum calculation Java NIO
Upasana | November 21, 2020 | 1 min read | 100 views
Java FileChannel provide much better performance than the BufferedInputStream and RandomAccessFile classes.
Read ArticleConcurrentModificationException in Java
Upasana | November 21, 2020 | 1 min read | 1,287 views | Multithreading and Concurrency
ConcurrentModificationException is raised by fail-fast iterators when the underlying collection is modified structurally during iteration.
Read ArticleCount word frequency in Java
Upasana | November 19, 2020 | 2 min read | 107 views
we will calculate word frequency for each word in a given sentence using various approaches - plain java, java 8 streams, parallel streams, etc.
Read ArticleFactorial of a large number in Java BigInteger
Upasana | October 18, 2020 | 1 min read | 374 views
Factorial of relatively large numbers can be calculated by storing the resultant in BigInteger instead of a long or double
Read ArticleSecure OTP generation in Java
Upasana | October 17, 2020 | 2 min read | 0 views
In this article we will learn how to generate a cryptographically strong OTP in Java using SecureRandom class.
Read ArticleCode review checklist for Java developers
Upasana | October 16, 2020 | | 24 views
Code review checklist considering clean code, concurrency, Reusability, Performance, Error Handling, Readability, Code Convention & Consistency and Security.
Read ArticleWhat is purpose of Collections.unmodifiableCollection
Upasana | October 03, 2020 | 1 min read | 70 views | Multithreading and Concurrency
What does Collections.unmodifiableCollection() do? Is it safe to use the collection returned by this method in a multi-threading environment?
Read ArticleJava Exception Class Hierarchy
Upasana | September 12, 2020 | 2 min read | 281 views
Throwable sits at the top of Java Exception Class hierarchy. Exception and Error are the two direct subclasses that extends Throwable.
Read ArticlePopular Tags
Trending Posts
- Code review checklist for Java developers
- Count word frequency in Java
- Secure OTP generation in Java
- HmacSHA256 Signature in Java
- Submit Form with Java 11 HttpClient - Kotlin
- Java Exception Class Hierarchy
- Http download using Java NIO FileChannel
- CRC32 checksum calculation Java NIO
- Precision and scale for a Double in java
- Difference between HashMap, LinkedHashMap and TreeMap