Top 25 Vue.js Interview Questions and Answers for 1 to 2 Years Experienced

With the success of libraries like React.js, developers around the globe are leaning more towards such flexible technologies. Though full-fledged frameworks like Angular are also popular and widely used, developers want flexibility. React.js is known for its flexibility. The popularity of React gave birth to another JavaScript library or framework (depending on your goal), called Vue.js. Created by Evan You in the year 2014, Vue had a modest start. It did not catch the attention of many developers. But in the past few years, Vue's popularity has increased immensely. 

Top 5 Courses to Learn Software Architecture for Experienced Programmers in 2021

Every Programmer wants to grow in their career, but it's not easy, and if you don't pay attention to your job, you will likely stay in the same position for many years. The growth in the initial few years is generally fast. Still, once you reach the barrier of 5 years, you need to decide which direction you want to move like - people management, product management, or software architecture. For tech guys, who don't want to go on people and product management, the software architecture or solution architecture is the final position, which is not surprising.

How to print 1 to 100 without using loop in Java? Example Solution

This is one of the interesting problems  I have seen in coding interviews for beginners. The program has a surprise element by saying that you need to print 1 to 100 without using a loop e.g. for, forEach, or enhanced for loop. This brings out some innovative solutions from candidates which tell a lot about their approach, knowledge, and attitude. I remember, asking this question during campus recruitment to at least 5 candidates. The first one took 5 minutes to think and then come up with the brute force way where he just copies pasted 100 System.out.println() and printed numbers 1 to 100 but when we asked to improve that, he couldn't do that. Unfortunately, he didn't think that recursion can replace an iterative algorithm without using a loop.

How to use SynchronousQueue in Java? Prouder Consumer Example

SynchronousQueue is a special kind of BlockingQueue in which each inserts operation must wait for a corresponding remove operation by another thread and vice versa. When you call to put() method on SynchronousQueue it blocks until another thread is there to take that element out of the Queue. Similarly, if a thread tries to remove an element and no element is currently present, that thread is blocked until another thread puts an element into the queue. You can correlate SynchronousQueue with athletes (threads) running with Olympic torch, they run with a torch (object need to be passed) and passes it to other athlete waiting at another end.

Top 10 Microservices Design Patterns and Principles - Examples

Hello guys, if you are using Microservice architecture and want to learn about different Microservice design patterns and principles to better architect your application then you have come to the right place. Earlier, I have shared the best Java Microservices courses and books for Java developers, and in this article, I am going to share the essential Microservice design principle and patterns. We will cover patterns like Event Sourcing, Circuit Breaker, SAGA, CQRS, Strangle, and API Gateway and principles like Scailibity, Flexibility, Resiliency, etc. 

Top 5 Online Courses to Learn React Native for Beginners in 2021 - Best of Lot

If you are a web developer who wants to go into the massive world of mobile app development but don't want to spend time learning Java or Kotlin for Android development or Objective C or Swift for iOS development, React Native could be an excellent tool for you. React Native is an extension of React, a popular JavaScript framework to develop web applications, which allows you to build native Android and iOS applications in JavaScript. Unlike Ionic and Cordova, which promotes write once run everywhere but doesn't offer you to create a native app, React Native does convert your code into native code, especially for GUI.

How to Convert an Array to Comma Separated String in Java - Example Tutorial

The simplest way to convert an array to comma separated String is to create a StringBuilder, iterate through the array, and add each element of the array into StringBuilder after appending the comma. You just need Java 1.5 for that, even if you are not running on Java 5, you can use StringBuffer in place of StringBuilder. The joining of String has got even easier in JDK 8, where you have got the join() method right in the String class itself. The join() method takes a delimiter and a source, which can be an array or collection, and returns a String where each element is joined by a delimiter.

Top 5 Online Courses to Learn Hadoop and Big Data in 2021 - Best of Lot

If you are learning Big Data and want to explore the Hadoop framework and looking for some excellent courses, then you have come to the right place. In this article, I am going to share some of the best Hadoop courses to learn Hadoop in depth. In the last couple of articles, I have shared some Big Data and Apache Spark resources, which are well received by my readers. After that, a couple of my readers emailed me and asked about some Hadoop resources, like books, tutorials, and courses, which they can use to learn Hadoop better. This is the first article in the series on Hadoop; I am going to share a lot more about Hadoop and some excellent resources in the coming month, like books and tutorials.

Java 8 - Stream FlatMap Example - List of Lists to List

The flatmap is an interesting concept of functional programming which allows you to flatten the list or stream apart from transforming it, just like the map does. This means you can use the flatmap to flatten the stream. If you have used the map() function from the Stream class before then you can use it to convert an object of type T to another object of Type S. For example, if you have a list of Authors then you can convert it to a List of books by transforming authors to books. FlatMap extends this idea, it not only transform one object to other it also flattens the list and that's it's very useful where you want to know about a combined data set. 

What is Double Brace Initialization in Java? Initializing HashMap and List with Values Example

Double brace initialization is a Java idiom to initialize a Collection like a list, set, and map at the time of declaration. At times, you need a list of fixed elements e.g. supported products, supported currencies, or some other config, and on-the-spot initialization reduces the line of code and improves readability. Double brace initialization idiom becomes popular because there is no standard way to create and initialize Collection at the same time in Java. Unfortunately, unlike other JVM languages like Scala and Groovy, Java doesn't support collection literals yet. 

Top 5 Courses to Learn TypeScript for Web Developers in 2021 - Best of Lot

Hello guys, if you are thinking of learning TypeScript this year and looking for some excellent resources like books, courses, and tutorials, then you have come to the right place. In my last few articles, I have shared some of the best Angular framework tutorials and courses, and today, I will share some of the best TypeScript online courses you can join to learn it by yourself. Many programmers and web developers are learning TypeScript because of its powerful syntax and advanced OOP features and, more importantly, to develop Angular-based applications. Since the Angular team has chosen TypeScript as the official language for Angular development, it's crucial to know TypeScript if you want to make full use of Angular, but that's not the only reason you should learn TypeScript.

Overriding equals() and hashCode() method in Java and Hibernate

Override equals and hashCode in Java
Equals and hashCode in Java are two fundamental methods that are declared in Object class and part of the core Java library. equals() method is used to compare Objects for equality while hashCode is used to generate an integer code corresponding to that object. equals and hashCode have been used extensively in Java core library like they are used while inserting and retrieving Object in HashMap, see how to get method of HashMap works in Java for the full story, equals method is also used to avoid duplicates on HashSet and other Set implementation and every other place where you need to compare Objects.

What is String deduplication in Java? How to Save Memory from Duplicate String in Java 8? [Answer]

You might not be aware that Java 8 update 20 has introduced a new feature called "String deduplication" which can be used to save memory from duplicate String objects in Java application, which can improve the performance of your Java application and prevent java.lang.OutOfMemoryError if your application makes heavy use of String. If you have profiled a Java application to check which object is taking the bulk of memory, you will often find char[] object at the top of the list, which is nothing but an internal character array used by String object. Some of the tools and profilers might show this as java.lang.String[] as well like Java Flight Recorder, but they are essentially pointing to the same problem i.e. a major portion of memory is occupied with String objects.

How to return different HTTP status code from a Spring MVC controller? Example Tutorial

Hello guys, if you are wondering how to return different HTTP Status codes from a Spring MVC controller then you have come to the right place. You can use @ResponseCode annotation on Spring MVC to send different HTTP codes to the client as part of the HTTP response. If you are developing REST APIs then you can even @RestControler to do that job. This article will demonstrate how to return different HTTP statuses for a Spring MVC controller. Prior to implementation, all we need to understand what is with the HTTP return types and why we need them. Let's have a quick look into this.

5 Differences between COALESCE and ISNULL in SQL Server - Example Tutorial

Even though both ISNULL and COALESCE is used to provide default values for NULLs there are some key differences between them like ISNULL() is a T-SQL or Microsoft SQL Server-specific function or operator, and datatype and length of the result depends upon a parameter, but COALESCE is a SQL ANSI standard, it can accept more than one parameter and unlike ISNULL, the result doesn't directly depend upon a parameter, it is always the type and length of the value returned. Also, what is the difference between COALESCE and ISNULL is one of the frequently asked Microsoft SQL Server interview questions, and knowing these differences can help in both your day-to-day SQL development works and during job interviews.

Difference between map() and flatMap() in Java 8 Stream - Example

The map() and flatmap() are two important operations in the new functional Java 8. Both represent functional operation and they are also methods in java.util.stream.Stream class but the map is used for transformation and flatmap is used for both transformation and flattening, that's why it's called the flatmap. The key difference between map() and flatmap() function is that when you use a map(), it applies a function on each element of the stream and stores the value returned by the function into a new Stream. This way one stream is transformed into another like a Stream of String is transformed into a Stream of Integer where each element is the length of the corresponding Stream.

Top 5 Courses to Crack AWS Solutions Architect - Associate Exam (SAA-C01 and C02) in 2021 - Best of Lot

Hello guys, are you preparing for AWS Solutions Architect - Associate Exam?  or Do you want to become Amazon Web Services (AWS) Certified Developer to give your Cloud Computing career a push? and looking for some useful resources to prepare well for your exam then you have come to the right place. In the past, I have shared some free courses to learn AWS for beginner and in this article, I will share some of the best online courses to pass the AWS Solutions Architect - Associate Exam and become Amazon Web Services Certified Associate - a certification which will not only add value into your resume but also help you to get the high-paying job you always wanted.

How to use props in React? Example Tutorial

If you have ever worked with React, you definitely know what components are. A react application is made of several components and that is why components in React are defined as the building blocks of the application. In simple terms, a component is a class or function that can accept input and return a piece of code that defines a UI. Every React component can have input. These inputs are known as props. Props stand for properties and they are optional. A component works fine without props but they are one of the most useful parts of React.

3 Best Spring Security Online Training Courses for Java Developers in 2021 [UPDATED]

Spring Security is one of the leading open-source, security frameworks that allow you to implement security in Java-based web applications. It provides several security features like authentication, authorization, remember me out-of-the-box, which means you can directly use them without adding code or changing your class. Yes, Spring Security implements security at the application level i.e. you can even secure your non-secure resource without modifying them. It is also the leading framework to secure RESTful Web Services. Because of all these, the demand for Java developers with good knowledge of Spring Security is very high.

10 Example of Lambda Expressions and Streams in Java 8

Java 8 release is just a couple of weeks away, scheduled on 18th March 2014, and there is a lot of buzz and excitement about this path-breaking release in the Java community. One feature, which is synonymous with this release is lambda expressions, which will provide the ability to pass behaviors to methods. Prior to Java 8, if you want to pass behavior to a method, then your only option was the Anonymous class, which will take 6 lines of code, and the most important line, which defines the behavior is lost in between. Lambda expression replaces anonymous classes and removes all boilerplate, enabling you to write code in a functional style, which is sometimes more readable and expression.

Top 30 React.js Interview Questions Answers for 1 to 2 Years Experienced

Hello guys, if you are preparing for React developer interviews and looking for frequently asked React.js interview questions then you have come to the right place. Earlier, I have shared the best courses, books, and websites to learn React.js and in this article, I am going to share 35 frequently asked React.js interview questions, suitable for 1 to 2 years experience developers. ReactJS is one of the most recently built open-source front-end programming languages. It came directly from Facebook's headquarter back in 2011. Earlier Recat.js was only limited to Facebook but now, it is one of the most extensively used programming languages all across the world.

What is volatile modifier or volatile field in Java? Example

The volatile modifier has always been an interesting and tricky topic for many Java programmers. I still feel that it's one of the most underutilized modifiers in Java, which can do a lot of good if understood and applied correctly, after all, it provides a lock-free way to achieve synchronization in Java. If a field is shared between multiple threads and one of them changes its value i.e. one thread reads from the field which is written by other threads, then, by using a volatile modifier, you can synchronize access to this field. The volatile modifier in Java provides visibility and ordering guarantees without any locking.

Top 6 Courses to Learn Jenkins for CI/CD for Java Developers in 2021 - Best of Lot

In today's world of Agile and DevOps, Jenkins has become an indispensable tool for both Java programmers and DevOps engineers. Jenkins allows you to set up continuous integration (CI) and continuous deployment (CD) pipeline, which reduces risk on Software development and delivery. This means hassle-free development and deployment. It also means quicker feedback because as soon as a commit has been made into a source control system like Git, Jenkins can start building artifacts and running unit tests. You will instantly receive an email if the build fails due to an issue or a unit test doesn't pass. This quick feedback loop ensures that your codebase remains error-free.

5 Difference between Constructor and Static Factory method Pattern in Java

The common way to create objects in Java is by using public constructors. A class provides a public constructor like java.lang.String so anyone can create an instance of String class to use in their application, but, there is another technique that can be used to create objects in Java and every experienced Java programmer should know about it. A class can provide a public static factory method that can return an instance of the class e.g. HashMap.newInstance(). The factory method is a smart way to create objects in Java and provides several advantages over the traditional approach of creating objects using constructors in Java. It can also improve the quality of code by making the code more readable, less coupled, and improves performance by caching.

How to set Java Path and Classpath in Windows 7, 8 and Windows 10 - Tutorial

So, you just bought a new PC or Laptop with Windows 8 operating system, and wondering how to set PATH and Classpath on Windows 8; Or, you might have just upgraded your Windows 7 laptop to the professional edition of Windows 8 and looking to set JDK Path to compile Java programs. Not to worry, this is the second step for anyone who wants to learn Java programming. Of course, the first step is to install JDK.  In this Java tutorial, we will see step by step guide to set Java PATH and CLASSPATH in the Windows 8 operating system. By the way, if you are learning Java in Windows 10 operating system, You should still be able to set the Java path and classpath in Windows 10 by following the steps given here, because navigation steps for modifying environment variables on Windows 10 and Windows 8 are almost same.