Friday, December 13, 2024
Polymorphism and Inheritance Example in Java
How to fix java.lang.NoSuchMethodError: main Exception in thread "main" in Java? Example
How to deal with NullPointerException in Java with Examples - java.lang.NullPointerException Guide
Difference between transient and volatile keyword in Java? example
Why wait, notify, and notifyAll methods are called from synchronized block or method in Java?
Wednesday, December 11, 2024
The multi-part identifier XXX could not be bound in SQL SERVER [Solution]
Problem, I was doing join statement and getting this error Msg 4104, Level 16, State 1, Line 69
The multi-part identifier "a.X" could not be bound."
Cause:
I was mixing implicit joins with explicit joins. That is allowed, but you need to be aware of how to do that properly.
The thing is, explicit joins (the ones that are implemented using the JOIN keyword) take precedence over implicit ones (the 'comma' joins, where the join condition is specified in the WHERE clause).
Top 10 Websites and Online Platforms to Learn Git for FREE in 2025 - Best of Lot
Top 7 Spring Microservices Courses with Spring Boot and Spring Cloud in 2025 - Best of Lot
Difference between Wait and Sleep, Yield in Java? Example
Difference between Thread vs Runnable interface in Java
Top 10 Coursera Courses to Learn Computer Science and Software Development in 2025 - Best of Lot
Top 8 TensorFlow Courses for Beginners and Experienced in 2025 - Best of Lot
Top 10 Free Courses to Learn Docker in 2025 - Best of Lot [UPDATED]
Top 5 Java Design Pattern Courses for Experienced Java Developers in 2025 - Best of Lot
Top 10 Free Courses for System Design Interviews in 2025 - Best of Lot
Top 6 Courses to learn Django Framework in 2025 - Best of Lot
[Udemy Course Review] - Is Java 17 Masterclass: Start Coding in 2025 by Tim Buchalka Worth it?
Top 10 Java Programming Courses for Beginners to Learn Online in 2025 - Best of Lot
Monday, December 9, 2024
What are AtomicInteger and AtomicLong in Java? How it works? compareAndSet() Example Tutorial
Is "Java Concurrency in Practice" still Valid in the Era of Java 23?
Top 8 Courses to learn Reactive Spring Boot and WebFlux in 2025 - Best of Lot
Top 10 Coursera Courses and Certifications to Learn Web Development in 2025 - Best of Lot
Top 8 Courses to learn Microsoft Azure Cloud in 2025 - Best of Lot
Top 7 Object Oriented Programming and Design Courses for Java Programmers in 2025 - Best of Lot
Top 10 Online Courses to Learn Python 3 in 2025 - Best of Lot
Sunday, December 8, 2024
Review - Is ByteByteGo System Design Interview Course by Alex Xu Really Worth it in 2025?
Coursera's Google IT Support Professional Certificate Review - Is it worth it in 2025?
Wednesday, December 4, 2024
6 ways to get the selected text from html drop down list in jQuery?
One of the common task in web development is retrieving the selected text from a drop down list, which is nothing but HTML select element. This allows users to choose one of the options presented, each text is enclosed in option tag. how can we retrieve the selected text using jQuery? Well, there are multiple ways but core is first find the select element than the selected option by using :selected pseudo class selector.
Thursday, November 28, 2024
How to get the selected radio button on click using jQuery? Example
In last couple of articles, you have learned how to get all checked checkbox and how to find the unchecked checkbox using jQuery, let's see another similar example, this time with radio button. Suppose, in form you have two radio buttons to select the gender i.e. male and female. How do you find which radio button was selected when user clicked on them? well, we will use the jQuery selector to find that. In fact, its not much different than what you have used to find the checked checkbox i.e. $("input[type=radio]:checked") will give the selected radio button. In order to find the chosen radio button when user click, you need to bind a click handler. Let's see an example.
Thursday, November 21, 2024
How to enable/disable form elements using jQuery? Examples
In last couple of tutorials you have learned how to get all selected checkbox and radio buttons, and in this tutorial, you will learn how to enable/disable form elements using jQuery. A form element e.g. a textfield, radio buttons and checkbox, all represented using input tag can be enabled or disabled by adding an attribute called "disabled". It's similar to "checked" attribute we have seen for checkbox and radio buttons. If this attribute is not present then element is enable, but if this attribute is present then you can use disabled=true to disable the form element and disabled=false to enable the form elements as shown in our example.
Thursday, November 14, 2024
How to Compare Two Strings Without Case Sensitivity in Java? Example
How to Compare Two Strings Without Case Sensitivity in Java
Java provides several ways to compare strings without taking case sensitivity into account. In this article, we'll explore different methods to perform case-insensitive string comparisons in Java.
Method | Use Case | Efficiency |
---|---|---|
equalsIgnoreCase() | Checking equality | High |
compareToIgnoreCase() | Ordering comparison | High |
String.CASE_INSENSITIVE_ORDER | Sorting collections | High |
equals() + toUpperCase() | Not recommended | Low |
1. Using equalsIgnoreCase()
The equalsIgnoreCase() method
This method is ideal for checking if two strings are equal without considering their case. It returns true if both strings contain the same characters, regardless of their case.
String str1 = "Hello";
String str2 = "hello";
boolean isEqual = str1.equalsIgnoreCase(str2); // Returns true
2. Using compareToIgnoreCase()
The compareToIgnoreCase() method
Use this method when you want to check which string is greater or smaller, or to find out their relative ordering in lexicographical or alphabetical order, without considering case.
String str1 = "Apple";
String str2 = "banana";
int result = str1.compareToIgnoreCase(str2); // Returns a negative value
3. Using String.CASE_INSENSITIVE_ORDER
The String.CASE_INSENSITIVE_ORDER comparator
This comparator is useful for sorting a list of strings in case-insensitive order.
List<String> fruits = Arrays.asList("Apple", "banana", "Cherry");
Collections.sort(fruits, String.CASE_INSENSITIVE_ORDER);
// Result: [Apple, banana, Cherry]
4. Using equals() + toUpperCase()
Combining equals() and toUpperCase()
This is a tricky way to compare two strings in Java in a case-insensitive manner. First, convert both strings to uppercase, then compare them using equals().
String str1 = "Hello";
String str2 = "hello";
boolean isEqual = str1.toUpperCase().equals(str2.toUpperCase()); // Returns true
Note: This method is not recommended as it creates new String objects, which can be inefficient for large-scale comparisons.
Conclusion
When comparing strings without case sensitivity in Java, it's generally best to use the built-in methods like equalsIgnoreCase()
for equality checks and compareToIgnoreCase()
for ordering comparisons.
These methods are optimized and provide clear, readable code. For sorting collections of strings, the String.CASE_INSENSITIVE_ORDER
comparator is an excellent choice.
Remember, all these methods compare strings in lexicographical order. Choose the method that best fits your specific use case to ensure efficient and accurate string comparisons in your Java applications.
Thursday, November 7, 2024
How to convert XML to JSON in Java? Example
Since XML and JSON are two popular data interchange formats, you will often need to convert one into other. For example, many SOAP web services returns XML response and if you are using Java and wants to convert that XML response to JSON, then you can use JSON library from https://json.org. It provides a class called XML.java, which provides static methods to convert an XML text into a JSONObject. It also support JSON to XML conversion, which will learn in second part of the article. In order to use this class, you can dowload JAR files from Maven Central repository, or you can add required dependency in your pom.xml file.
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.
Educative Review - Is Grokking Modern System Design for Software Engineers and Managers worth it?
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.
Is Coursera and IBM's Full Stack Software Developer Professional Certificate worth it in 2025? Review
Hello guys, if you are looking for the best full-stack Software developer course or certification on Coursera or you want to join IBM's Full Stack Software Developer Professional Certificate program but are not sure whether it's right for you then you have come to the right place. In this article, we will review IBM Full Stack Software Developer certification on 3 important points, instructor reputation, Coursera structure, content quality, and people's review. This will help you to decide whether this course is right for you or not.
Review - Is Java Programming & Software Engineering Fundamentals Certification on Coursera worth it?
Top 10 Eclipse Plugins for Java and Spring Boot Developers
Top 10 Java 11 Certification Mock Tests and Practice Tests [4 Free OCPJP 11 Sample Questions]
Sunday, October 20, 2024
Top 5 Websites to Learn SQL Online for FREE - Best of Lot
Grokking The Java Interview - My First Book After 10 Years as Java Blogger
5 Projects You can do to learn iOS App Development in 2025
Coursera Review - Is the Meta Frontend and Backend Developer Certificates Worth It in 2025?
Is Google Data Analytics Professional Certificate Worth it in 2025? Coursera Review
Hello guys, if you want to become a Data Analyst in 2025 and looking for best online courses, guides, and tutorials to learn Data Analysis then you have come to the right place. In the past, I have shared best Data Analysis courses, Books, and 2025 Data Analyst RoadMap, and in this article, I will share one of the most popular Coursera course to learn Data Analytic, Google Data Analytics Professional Certificate. With more than 950,000 enrollments on Coursera this is one of the most popular Data Analytics course on Coursera and why not? Its created from Google itself. It's also well structured, up-to-date and you will learn all essential Data Analytics skills from Google experts.
Saturday, October 19, 2024
Review - Is 2025 Web Developer Bootcamp by Colt Steele on Udemy worth it?
Udemy's The Complete 2025 Web Development Bootcamp by Angela Yu Course Review
Udemy's The 2025 Complete Python Bootcamp From Zero to Hero in Python Review
Review - Is Deep Learning Certification By Andrew Ng on Coursera worth it? (2025)
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
Review - Is Coursera's Python for Everybody Specialization worth it in 2025? [Best Python Certification]
Top 10 Coursera Courses to Learn AWS, Google Cloud, Azure, and Cloud Computing in 2025 - Best of Lot
Top 10 Coursera Certifications for Data Science, Data Analysis, and Data Visualization in 2025 - Best of Lot
Thursday, October 17, 2024
Top 7 Free Git Courses for Programmers to Learn Online in 2025 - Best of Lot
Top 10 DevOps Courses for Experienced Programmers to Learn Online in 2025 - Best of Lot
Top 8 Courses to Crack AZ-900: Microsoft Azure Fundamentals Cloud Certification in 2025 - Best of Lot
Top 6 Course to Crack Azure Administrator Associate Certification Exam AZ-104 in 2025 - Best of Lot
Top 7 AWS Solution Architect Associate Certification Practice Test and SAA-C03 Exam Dumps in 2025
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.