Thursday, October 31, 2024
How to convert JSON String to Java HashMap? Example
Suppose you have a JSON String, may be a web-service response and you want to create a Map out of it, where key should be the fields and value should be values of those fields e.g. if given JSON String is following :
{
"zip": "90210",
"city": "Beverly Hills"
"state": "CA"
"timeZone": "P"
}
then your HashMap should contain 4 mappings where keys are zip, city, state and timeZone, all of String type and corresponding values.
Thursday, October 24, 2024
What is Timer and TimerTask in Java β Tutorial Example
4 Reasons and Benefits of Using Multithreading in Java? Why Threads?
4 examples to convert Date to LocalDate in Java 8?
One of the challenge you will face while using new Java 8 Date and time API, JSR-310 in existing Java application is the conversion between java.util.Date and java.time.LocalDate and other classes. Even though library has everything you would expect, it doesn't have a direct conversion method between old Date and new LocalDate. There is a reason for it, eventhough java.util.Date says its a date its not, becuase its just a millisecond value since midnight at the start of 1970 GMT. It's equivalent to Instant class in new Java Date API and that's why you have a direct conversion method between Date and Instant in Java 8. Anyway, its not hard to convert a java.util.Date to java.time.LocalDate in Java 8, in fact there are multiple ways which we will explore in this tutorial.
Wednesday, October 23, 2024
Difference between ExecutorService.submit() and Executor.execute() methods in Java?
Difference between Process and Thread in Java - Example
How to use Exchanger for Inter thread communication in Java? Example Tutorial
What happens when you call Thread.run() instead of Thread.start() in Java? Trick Interview Question
How to Implement Thread in Java with Example
In my opinion, Thread is one of the most important features of the Java programming language which helped it to become the most popular programming language. I remember, when I first started learning Java in one of the programming classes in India how important Thread was a portrait and how much emphasis is given on a clear understanding of multi-threading. Itβs still popular and one of most sought after skills in Java programmer because writing concurrent and multi-threaded applications in Java is challenging, despite Java providing excellent support at language level using synchronized and volatile keyword.
Udemy vs Educative Review? Which is better Website for Beginners?
Can You Learn Coding and Web Development in your 40s and 50s?
Monday, October 21, 2024
Review - Is Grokking the Machine Learning Interview on Educative Worth it in 2025?
Hello friends, we are here again today for another exciting topic to discuss. But, today we are not gonna discuss something which is related to Java or any other language or spring boot. Today we are gonna discuss something which is immensely practical and has the potential to land you very high-paying data science jobs. Today we are gonna review a course that focuses on Machine Learning! Machine Learning is very important when we are considering data science interviews! So what's the wait? Let's start! On Educative.io, there is a great course called Grokking the Machine Learning Interview. It couldn't have come at a better moment, with machine learning expected to be a $3.6 billion business by 2025.
Sunday, October 20, 2024
5 Projects You can do to learn iOS App Development in 2025
Saturday, October 19, 2024
Coursera's Google IT Automation with Python Certification Review - Is it worth it in 2025?
Udemy's The Data Science Course: Complete Data Science Bootcamp 2025 Review - Is it worth it?
Friday, October 18, 2024
Top 25 Skills Java Developers Should Learn in 2025 [UPDATED]
6 Tips to write Production Quality Code
Top 10 Multithreading and Concurrency Best Practices for Experienced Java Developers
Wednesday, October 16, 2024
How to find Square root of integer in Java without using any Library? Interview Question
Problem : Given an integer i, find square root of it, without using Math.sqrt() method. Your method should return square root if given number is perfect square otherwise return floor(sqrt(x));
For example,
Input i = 16
Output : 4
Input i = 17
Output : 4
This is very interesting problem and asked both freshers and experienced programmers. I have seen this question on many companies including ANZ, Barclays, and Citibank.
How to print Floyd's Triangle in Java? Example Tutorial
How to Check if two Rectangles Overlap in Java? Collision Detection Solution and Example
Tuesday, October 15, 2024
Linux Command to Find how Long a process is Running in UNIX - Example
Difference between FileInputStream and FileReader in Java | InputStream vs Reader Example
Monday, October 14, 2024
4 Ways to Convert String to long in Java? Example Tutorial
How to Count Negative Numbers in a Sorted Matrix? [Solved] (Amazon Coding Question)
Java Program to find factorial of number in Java - Example Tutorial
Thursday, October 10, 2024
How to check if array is a binary heap in Java? [Solved]
Problem : You have given an array of integer, check if the given array represents a binary max-heap data structure. In max heap every node is greater than all of its descendants.
For example :
Input: array[] = {100, 25, 20, 17, 22, 12}
Output: true
The given array represents below tree
100
/ \
25 20
/ \ /
17 22 12
This binary tree follows max-heap property as every node is greater than all of its descendant.
Saturday, October 5, 2024
10 Code Review Checklist and Best practices in Java
Code Review and Unit testing are some of the best development practices I always recommend, strive for, and enforce as much as possible. Even just by doing code review and Junit test case always offer positive results it can be improved a lot by constantly learning from our mistakes, others mistakes and by observing how others are doing it. I always try to get my code review done by someone with more technical and domain experience so that I can capture any domain-specific scenarios which have been missed during think through the process.
