Saturday, December 14, 2024

How to find the largest and smallest number in given Array in Java? Example Tutorial

Hello guys, today I am going to discuss one of the frequently asked programming interview questions to find the largest and smallest number from an integer array. This question is commonly asked on telephonic interviews and the first round for screening candidates. This coding problem is in the same league of other frequently asked algorithmic questions like Fibonacci, Palindrome, Prime, and Power of two checks. They are easy but you will find them difficult during the interview because of the pressure, particularly if you have not solved them before. Sometimes even if you have solved the problem one time, you tend to do mistakes because you haven't understood them properly. So, always take your time to understand the question.

Top 20 Amazon and Google Programming Interview Questions for Software Developers

Hello, In this article I am going to sharing some frequently asked programming job interviews from technical giants and startups. If you are going for a programming job interview with Microsoft, Google, or Amazon, you better be prepared for all kinds of questions. These companies are known to ask tough questions, tricky puzzles, and lots of data structure and algorithm questions. Since it's hard to prepare all these in a short time, it makes sense to at least have a good idea of frequently asked programming questions in Microsoft, Google, or Amazon.

Friday, December 13, 2024

Polymorphism and Inheritance Example in Java

Hello guys, If you are new to Java or Object oriented programming and wondering what is Polymorphism and Inheritance and what are their use then you have come to the right place. Polymorphism and Inheritance are two fundamental concepts in object-oriented programming that allow for flexibility and reusability of code. In Java, these concepts are closely related and often go hand in hand. Java Programming provides a couple of way to implement Inheritance like extending a class or implementing an interface. Similarly they provide overloading and overriding for Polymorphism. In the past, I have shared 40 object oriented questions as well as 23 design patterns and In this article, we'll explore these concepts with a practical example.

How to fix java.lang.NoSuchMethodError: main Exception in thread "main" in Java? Example

How to solve java.lang.NoSuchMethodError: main Exception in thread "main"
java.lang.NoSucMethodError comes when Java code tries to call a method that does not exist on a class, this could be either static or non-static method. a most common manifestation of java.lang.NoSuchMethodError is running a class that doesn't have the main method in Java. In this article, we will see what is "java.lang.NoSuchMethodError: main Exception in thread "main"", Why does java.lang.NoSuchMethodError comes and how to solve java.lang.NoSuchMethodError in Java.

How to deal with NullPointerException in Java with Examples - java.lang.NullPointerException Guide

The java.lang.NullPointerException or NullPointerException in Java is probably the first error or exception you will face in Java. It is a true nightmare for beginners in Java but pretty easy to solve once you get familiar with Exception handling in Java. What makes NullPointerException a little bit tricky to solve is its name which has a pointer in itself and Java does not support pointers like C++ or C, just like you don't have multiple inheritances in Java. As a Java developer with 20 years of experience, I have solved countless amount of NullPointerException and now I have developed a coding and debugging sense through which I can spot what causing a particular NullPointerException and how to fix it. 

Difference between transient and volatile keyword in Java? example

Surprisingly "Difference between transient and volatile keyword in Java" has asked many times on various java interviews. volatile and transient are two completely different keywords from different areas of Java programming language. the transient keyword is used during serialization of Java object while volatile is related to the visibility of variables modified by multiple threads during concurrent programming. The only similarity between volatile and transient is that they are less used or uncommon keywords and not as popular as public, static, or final.

Why wait, notify, and notifyAll methods are called from synchronized block or method in Java?

Most of the Java developers know that wait(), notify(), and notifyAll() methods of object class must have to be called inside synchronized method or synchronized block in Java but how many times we thought why? Recently this question was asked to in Java interview to one of my friend, he pondered for a moment and replied that if we don't call wait() or notify() method from synchronized context we will receive IllegalMonitorStateException in Java. He was right in terms of the behavior of language but as per him, the interviewer was not completely satisfied with the answer and wanted to explain to him more about it.

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

Hello guys, like many programmers, I have also worked with a lot of source control systems like SVN, CVS, TFS, VSS, Mercury, and I had always wondered why so many source control systems? Why not just one. It's one of the necessary software tools for development, and everyone needs a version control and code repository, there should be a standard solution. It seems Git and Github have solved that problem now. Now, Git is everywhere from open source to closed source, from small startups to big Investment banks, but there were still legacy projects which were lying on SVN and CVS, but they are now also started moving towards it.

Top 7 Spring Microservices Courses with Spring Boot and Spring Cloud in 2025 - Best of Lot

Microservices is the new buzzword in software development word and everybody is talking about it, but it's been in practice for quite some time especially in the form of RESTful web services. The idea of Microservices is simple, breaking a big monolithic application that contains everything from UI to service layer to database into small chunks of applications that are loosely coupled and can work on their own. For example, in a company like Uber, you could have several applications providing different services e.g. discovering when a driver is online or a passenger is searching for a cab, finding a route, traffic, and handling payments. These small applications are known as Microservices.

Difference between Wait and Sleep, Yield in Java? Example

The difference between wait and sleep or the difference between sleep and yield in Java is one of the popular core Java interview questions and asked on multi-threading interviews. Out of three methods that can be used to pause a thread in Java, sleep() and yield() methods are defined in thread class while wait() is defined in the Object class, which is another interview question. The key difference between wait() and sleep() is that the former is used for inter-thread communication while later is used to introduced to pause the current thread for a short duration. 

Difference between Thread vs Runnable interface in Java

Thread vs Runnable in Java is always been a confusing decision not just for beginnerin Java but also for developers who have done a couple of projects in Java. Thread in Java seems easy in comparison to Runnable because you just deal with one class java.lang.Thread while in case of using Runnable to implement Thread you need to deal with both Thread and Runnable two classes. though the decision of using Runnable or Thread should be taken considering differences between Runnable and Thread and the pros and cons of both approaches.

Top 10 Coursera Courses to Learn Computer Science and Software Development in 2025 - Best of Lot

Hello folks, if you are looking for the best Coursera courses for Software Development and Computer Science, you have come to the right place. Earlier, I shared the best Data Science courses and the best Python Courses from Coursera. This article will share the best courses to learn Software Development, Programming, and Computer Science for Beginners and experienced alike. 
Software development and programming are estimated to grow about 13% by 2026, which means that there is no better time to enter this field and learn new skills in software development and programming, whether web development, mobile apps, or the internet of things, so you need to do the impossible to stay above your competitor.  

Top 8 TensorFlow Courses for Beginners and Experienced in 2025 - Best of Lot

If you are curious about Artificial intelligence, Data Science, and Machine learning, then I am sure you have heard about TensorFlow, Google's machine learning API, which they have used to develop the RankBrain algorithm for Google Search. TensorFlow is one of the most popular machine learning API, which allows you to automate several real-world tasks; for example, you can use it for image detection. In fact, a Japanese farmer turned programmer used it to detect the best quality Cucumber, which only his father and mother can do with his years of experience. That's the power of machine learning, which is now available to everyone because of TensorFlow.

Top 10 Free Courses to Learn Docker in 2025 - Best of Lot [UPDATED]

I have been answering a lot of questions about what programmers should learn in 2025, and Docker Container is one such skill. Docker and containers are a whole new way of developing and delivering applications and IT infrastructure. In this post, I'll talk about what Docker is and why a programmer should learn Docker. In today's world of massive scalability, where every single mobile app and web application needs to support billions of users (think of YouTube, WhatsApp, Uber), software application development and deployment have become increasingly complex. Gone are the days when the software is developed by a small team of onshore people.

Top 5 Java Design Pattern Courses for Experienced Java Developers in 2025 - Best of Lot

Hello guys, today, we'll talk about design patterns and some of the best online courses to learn design patterns in Java from scratch. If you are wondering what is a design pattern and why Java developers should learn them? then let me give you a brief overview. Design patterns are nothing but a tried and tested solutions of common programming problems, for example, the creational design patterns deal with the problems of object creation. They exist from a long time but made popular by famous Gang of four of Erich Gamma, John Vlissides, Ralph Johnson and Richard Helm in their classic 1994 book Design Patterns: Elements of Reusable Object-Oriented Software, also known as GOF design patterns. This book documented 24 design patterns which are reusable to solve common programming problems. 

Top 10 Free Courses for System Design Interviews in 2025 - Best of Lot

Hello guys, if you are preparing for System Design Interview or just want to improve your Software design skills and looking for best free resources like tutorials and free online courses then you have come to the right place. In the past, I have shared best System design coursesbookswebsites, and popular System design questions but a lot of you asked for free resources and that's why I am going to share best free System design courses I found online. These online System Design training courses are completely free and provides a diverse knowledge about different System design concepts and process. 

Top 6 Courses to learn Django Framework in 2025 - Best of Lot

Hello folks, If you are learning Python Programming language for Web Development, then you may have heard about the Django framework. Django is one of the popular web development frameworks to create modern web applications using the Python programming language. Django is also the most popular and most mature Python web development framework around. It makes it easier to build better Web apps more quickly and with less code. Building websites with Django is not just smart and efficient, but fun too! Learning Django can also boost your CV as it's a very in-demand skill.

[Udemy Course Review] - Is Java 17 Masterclass: Start Coding in 2025 by Tim Buchalka Worth it?

Hello guys, if you want to learn Java Programming from scratch and looking for the best Java course to join then you have come to the right place. Earlier, I have shared the best Java Programming courses, and today, I am going to review Java Programming Masterclass for Software Developers by Tim Buchalka, one of the highest-rated Java courses from Udemy. This course was also known as The Complete Java Masterclass before and now its known as Java 17 Masterclass: Start Coding in 2025. I have mentioned this course multiple times throughout different articles because it's currently the best course to learn Java. It's both comprehensive and up-to-date and most importantly it's very cost-effective. You can buy this 80-hour comprehensive course for just $10 which is just amazing. 

Top 10 Java Programming Courses for Beginners to Learn Online in 2025 - Best of Lot

If you are a computer science graduate or someone who wants to learn Java and looking for some awesome resources like books, tutorials, and online courses then you have come to the right place. In the past, I have shared some great books, websites, and tutorials to learn Java and in this article, I am going to share some of the best Java courses beginners can join to learn Java in 2025. One of the main problems with learning Java is keeping pace with the increasing number of releases. For example, Java 8 release completely changed how Java is written and after that, we have many Java releases in the form of Java 9Java 10, Java 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, and now Java 23. But the good thing is that the core of Java is still the same and all its releases are backward compatible.

Monday, December 9, 2024

What are AtomicInteger and AtomicLong in Java? How it works? compareAndSet() Example Tutorial

Concurrency is a fundamental aspect of modern software development, and Java provides a variety of tools and classes to help developers manage shared resources and coordinate the behavior of multiple threads. Among these tools one is atomic variables, which ensure that certain operations on shared data are performed atomically, I mean in one shot, without the need for explicit synchronization. In the past I talked about difference between atomic, synchronized, and volatile in Java and In this article, we'll explore atomic variables in Java, with a focus on AtomicInteger and AtomicLong, and explain how they work and how to use them effectively in Java. 

Is "Java Concurrency in Practice" still Valid in the Era of Java 23?

Hello guys, one of my reader Shobhit asked this question on my blog post about 12 must-reads advanced Java books for intermediate programmers - part 1. I really like the question and thought that many Java programmers might have the same doubt whenever someone recommends them to read Java Concurrency in Practice. When this book came first in 2006, Java world was still not sure of about new concurrency changes made in Java 1.5, I think the first big attempt to improve Java's built-in support for multi-threading and concurrency. 

Top 8 Courses to learn Reactive Spring Boot and WebFlux in 2025 - Best of Lot

Hello Java programmers, if you want to learn Reactive Programming with Spring Boot and WebFlux and are looking for some online courses to start with, you have come to the right place. Earlier, I have shared the best Spring Courses and best Spring Boot courses, and today, I will share the best online course to learn Reactive Programming with Spring Boot and Web Flux. In recent times, Reactive programming has become very popular. It is a programming paradigm that focuses on an asynchronous, event-driven, non-blocking approach for processing data which paves for writing a next-generation scalable web application in Java.  This means a thorough knowledge of reactive programming is a must for creating scalable web applications, and that's why Java developers need to learn reactive programming. 

Top 10 Coursera Courses and Certifications to Learn Web Development in 2025 - Best of Lot

Hello guys, If someone asked me 10 years ago about how to learn web development and get a job I would more likely say that you have to go to college and get your Bachelor’s degree and then try to get a job or internship. In short, it was only possible to become a web developer by spending years on education and thousands of dollars, now the internet has changed the game nowadays. These days many online platforms like CourseraUdemyPluralsight, CodeCademy, and Educative appeared to the world allowing people to take online training courses in almost any industry and web development is one of them. 

Top 8 Courses to learn Microsoft Azure Cloud in 2025 - Best of Lot

Hello guys, if you want to learn about the Microsoft Azure Cloud Platform, you have come to the right place. In the past, I have shared the best courses to pass Azure FundamentalsAzure Administrator, and Azure Architect certifications. Today, I will share the best online course to learn the Azure platform for Beginners. These are top-quality courses from expert trainers and instructors and are picked from Udemy, Coursera, and edX. You can use these courses to learn Microsoft Azure core services and prepare for different Microsoft Azure certifications like AZ-900, AZ-303, and AZ-20 Azure developer associate certification.

Top 7 Object Oriented Programming and Design Courses for Java Programmers in 2025 - Best of Lot

There is no doubt that Object-oriented programming is a pillar of software development and one of the reasons for the massive success of Java. Good knowledge of Object-oriented programming helps you to create better software. It also allows you to communicate your ideas better with your team members and fellow programmers. Despite being such an important technology, it's difficult to find programmers who understand OOP well. Many programmers just think that OOP is nothing more than Abstraction, Inheritance, Encapsulation, and Polymorphism, without genuinely understanding these concepts and mastering them.

Top 10 Online Courses to Learn Python 3 in 2025 - Best of Lot

If you are a Programmer or a Computer Science graduate and thinking of learning Python in 2025, then you have come to the right place. In this article, I am going to share some of the best online courses to learn Python 3 in 2025. Python is one of the most popular programming languages, and it's used in many domains, like Web development, Automation, Data Science, Machine learning, etc. In recent years, Python has also become a default language for Data Science and Machine learning Projects, and that's another reason why many experienced programmers are learning Python in 2025.

Sunday, December 8, 2024

Review - Is ByteByteGo System Design Interview Course by Alex Xu Really Worth it in 2025?

Hello guys, if you are preparing for System Design Interview in 2025 then you may have most likely come across names like ByteByteGo, Alex Xu or System Design Interview - An Insider Guide by Alex Xu, and if you are wondering what they are or you know about them but thinking whether ByteByteGo is worth it or not in 2025? then you have come to the right place. Yes, ByteByteGo is indeed worth considering for your System Design Interview preparation. because its created by Alex Xu, an expert with FAANG interview experience, the platform offers in-depth coverage of system design topics. The author's use of diagrams to explain concepts in detail enhances the learning experience and most importantly Alex Xu regularly and new content and update old ones, for example, he has recently added a section for coding interview patterns in ByteByteGo website.

Coursera's Google IT Support Professional Certificate Review - Is it worth it in 2025?

Hello there, if you are looking for a cost-effective and recognized IT training program to start your career in IT support then you have come to the right place. In this article, we'll review Google IT Support Professional Certificate from Coursera which can be used to launch your career in IT support in 2025. This is one of the most popular Coursera certification from Google and also one of the best structured and many beginners have joined this program, more than 1 million (precisely 1, 330, 000) which is a testament of the value this certification provides and with new AI related chapters and enhancement, this Google certification has become even more valuable to kick start your IT support career 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.