Can You Override static method in Java? Method Hiding Example

Can we override the static method in Java?
This is one of the most popular Java interview questions. The answer to this question is No, you cannot override the static method in Java because the method overriding is based upon dynamic binding at runtime and static methods are bonded using static binding at compile time. This means static methods are resolved even before objects are created, that's why it's not possible to override static methods in Java. Though you can declare a method with the same name and method signature in the subclass which does look like you can override static methods in Java but in reality that is method hiding. 

Top 95 Programming Interview Questions Answers to Crack Any Coding Job Interview

Hello guys, if you are preparing for your next Programming Job interview and looking for frequently asked Coding or Programming questions to practice then you have come to the right place. In this article, I am going to share some of the most commonly asked Coding questions from Programming Job interviews. In order to do well on the Coding interview you need practice, you just can't go there and try to solve the coding problems in a limited time, that's actually one of the most common reasons to fail your programming Job interviews.  Sometimes, the interviewer also asks a little bit easier coding questions on a telephonic interview like revering array in place or reversing a string in place.

Top 30 Stack and Queue Data Structure Interview Questions for Practice

Hello guys, stack and queue are two fundamental data structures which are used on many applications and algorithms. For example, you can use stack to convert a recursive algorithm to iterative one, which is more safe in production and no risk of StackOverFlowError. Similarly, queue is used in many asynchronous algorithms like producer consumer pattern or publish subscribe pattern to exchange messages. Because of that, they are also quite popular on coding interviews, particularly on Java developer interviews. In the past, I have shared 100+ data structure questions as well as String coding problems, array questions, linkedlist questions, recursion questions and even dynamic programming questions but I have not shared stack and queue related questions before. 

Top 5 System Design Newsletter You Can Read in 2024

Hello guys, if you want to learn System design then there are many ways you can start. For example, you can start with reading a System Design book, or joining an online course, but if you want to keep yourself updated and believe in constant learning then there is no better way then subscribing to a System Design Newsletter. When it comes to System design newsletter you can find many newsletter online, just open your LinkedIn and you will see a post popping here or there but you cannot subscribe to all of them as it doesn't make sense. A better strategy is to subscribe only the best newsletters so that you doesn't get overwhelmed but also keep learning useful concepts and new tech trends. 

3 ways to check if checkbox is selected in jQuery - Example Tutorial

 So, you have a checkbox and you want to check if its selected or not at runtime using jQuery. If that's what you want then continue reading. A checkbox is an HTML element with type="checkbox" and checked property is used to find out whether a checkbox is selected or not. There are several ways to find if your checkbox has this property or not in jQuery e.g. by using :checked, a pseudo selector or by using is() jQuery function or by using prop() function which is available from jQuery 1.6 onward. In this article, we will see examples of these approaches to check if a check box is checked or not. 

Top 10 Frequently asked SQL Query Interview Questions Answers

In this article, I am giving some examples of SQL queries which is frequently asked when you go for a programming interview, having one or two year experience in this field. Whether you go for a Java developer position, QA, BA, support professional, project manager, or any other technical position, may interviewer expects you to answer basic questions from Database and SQL. It's also obvious that if you are working for one or two years on any project there is a good chance that you come across to handle databases, writing SQL queries to insert, update, delete and select records. 

Top 100 Data Structure and Algorithm Interview Questions for Java Programmers

Data structure and algorithms are a core part of any Programming job interview. It doesn't matter whether you are a C++ developer, a Java developer, or a Web developer working in JavaScript, Angular, React, or Query. As a computer science graduate, it's expected from a program to have strong knowledge of both basic data structures, like the array, linked list, binary tree, hash table, Stack, Queue, and advanced data structures like the binary heap, trie, self-balanced tree, circular buffer, etc.

Top 10 Books Java Developers Must Read

Hello guys, If you are a Java developer and wondering what to read, then you have come to the right place. In this article, I will share 10 books on Java, Spring, and related technology a Java developer can read. I have included books for both experienced Java developer who is more inclined to learn about architecture stuff,  developing for Cloud, Microservice, Java 9 to Java 21 features, and Spring 6 features and thinking of learning Kotlin to improve their productivity. Still, I have not forgotten junior and less experienced Java developers or some thinking of starting their journey into the Java world

Top 5 Cloud Computing Books for Beginners to Read in 2024 - Best of Lot

Hello guys, if you want to learn Cloud Computing in 2024 and looking for the best online resources like books, online courses, tutorials, and websites then you have come to the right place. Earlier, I have shared the free cloud computing courses and best websites for cloud computing, today, I am going to share the best book to learn about Cloud computing in 2024. These books are written by Cloud Computing experts and trusted by thousands of people who want to learn Cloud Computing and public cloud platforms like AWS, GCP, and Microsoft Azure. You can read one or more of these book to get started with Cloud Computing and benefits it offer in terms of cost saving, scalability, and high-avaibility. 

How to remove duplicates from Collections or Stream in Java? Stream distinct() Example

Hello guys, if you wonder how to remove duplicates from Stream in Java, don't worry. You can use the Stream.distinct() method to remove duplicates from a Stream in Java 8 and beyond. The distinct() method behaves like the distinct clause of SQL, which eliminates duplicate rows from the result set. The distinct() is also a standard method, which means it will return a new Stream without duplicates, which can be used for further processing. Like other methods of Stream class, I mean, map(), flatmap(), or filter(), distinct() is also lazy, and it will not remove duplicate elements until you call a terminal method on Streams like collect or forEach().  

Top 10 Algorithms books Every Programmer Should Read

Algorithms are language agnostic, and any programmer worth their salt should be able to convert them to code in their programming language of choice. Unfortunately, I have come across several programmers who are REALLY good at programming languages like Java or Python, like know minor details of API and language intricacies but have very poor knowledge of the fundamentals of Algorithms and Data Structures. Just ask them to implement any popular sorting algorithms like quicksort or merge sort, and they will fall apart. If you expect them to know more advanced and sophisticated algorithms like String processing algorithms, graph algorithms, tree traversal, or greedy algorithms, be ready to check on Interviews; otherwise, you might end up with some surprises.

5 Examples of map() and flatMap() in Java 8 Stream

The map() and flatMap() are prince and princess of functional programming in Java. They are two powerful methods of Stream API which I believe every Java developer should be aware of and should also master it. You can use map() and flatMap() for data transformation, dealing with database operations where you need to convert one object to another while saving or reading from database. You can also use them for parsing and formatting as well as when you want to remove boiler plate code and make your data pipeline concise. The map() function is used in functional programming to transform each element of Stream into another element. 

Top 21 String Programming and Coding Interview Questions With Solutions

In this article, I am going to share 21 of the most common String-based Programming and Coding interview questions from Java developer interviews. These questions require you to write code to solve the problem and they are different from traditional Java String questions like how the substring method works in Java? or when to use the intern() method of String in Java? Since coding and problem solving are an important part of any programming job interview, it's imperative that you know how to solve them in time and in a pressure situation, which comes only after doing practice with the right set of questions. Since these questions are already tried and tested and appeared in many interviews, they will provide you the experience you need to crack your coding interview.