<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Thailane</title>
    <description>The latest articles on DEV Community by Thailane (@thailaneld).</description>
    <link>https://dev.to/thailaneld</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1451272%2F1df0cc4c-4f39-4e8a-a8eb-2d71124b95ad.jpeg</url>
      <title>DEV Community: Thailane</title>
      <link>https://dev.to/thailaneld</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thailaneld"/>
    <language>en</language>
    <item>
      <title>What is Spring Boot and what are its advantages?</title>
      <dc:creator>Thailane</dc:creator>
      <pubDate>Mon, 09 Sep 2024 18:55:14 +0000</pubDate>
      <link>https://dev.to/thailaneld/what-is-spring-boot-and-what-are-its-advantages-2kki</link>
      <guid>https://dev.to/thailaneld/what-is-spring-boot-and-what-are-its-advantages-2kki</guid>
      <description>&lt;p&gt;&lt;strong&gt;Brief history&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Spring came into being in 2003 as a response to the complexity of the early J2EE specifications. While some consider Java EE and its modern-day successor Jakarta EE to be in competition with Spring, they are in fact complementary. The Spring programming model does not embrace the Jakarta EE platform specification; rather, it integrates with carefully selected individual specifications from the traditional EE umbrella.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Spring Boot is a project within the Spring ecosystem that helps us create standalone applications that do not rely on anything else; they work on their own, with the only requirement being Java, which must be installed for them to function. Spring Boot assists with infrastructure tasks, managing the configuration of our project’s infrastructure, especially with the initial setup needed to start coding and implementing business logic, allowing for a more organized project and easier deployment to production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some advantages of Spring Boot:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Convention Over Configuration&lt;/strong&gt;: Spring Boot configures the project based on conventions it adopts. For example, if you want to use JPA, it already includes a dependency that adds sub-dependencies, such as the JPA API, what’s needed for RabbitMQ, etc. The versions of these sub-dependencies are already compatible with each other, tested by the entire Spring Boot community and team. Besides this example, there are a series of dependencies you can configure for your project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Embedded Server&lt;/strong&gt;: Spring Boot comes with an embedded server, with Tomcat being the default. This greatly simplifies development because you don’t need to download a server, and it also simplifies production since you don’t need to have or download a server. You can simply take the application, deploy it to production, and have an embedded server ready to run the application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Organized POM.XML&lt;/strong&gt;: If you use Maven, you know the POM can sometimes get messy, but with Spring Boot, it’s easier to keep the pom.xml organized. You avoid adding multiple dependencies and checking if they are compatible with each other.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DevTools&lt;/strong&gt;: Spring Boot provides DevTools, which automatically restarts the project upon any changes made. It also allows for some convenient configurations for development without manually setting them in the application.properties (the configuration file). For HTML page caching, DevTools disable it, so you don’t need to restart the application when making changes to HTML.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LiveReload Integration&lt;/strong&gt;: When an HTML page is modified, the cache is disabled, and LiveReload integration is enabled, so when returning to the browser, there’s no need to press F5; it updates automatically.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Metrics Analysis&lt;/strong&gt;: Spring Boot includes the Actuator dependency, which helps monitor and manage the health of the application, allowing you to view and monitor resource usage, especially on production servers. It does this without generating source code lines, and you can customize it just like any other project without Spring Boot. It will detect your configurations and avoid applying its own.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fno83frw3jjpteye4qobk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fno83frw3jjpteye4qobk.png" alt=" " width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;STS IDE&lt;/strong&gt;: This IDE helps with any Spring ecosystem project, including Spring Boot. For instance, if you want to create a Spring Boot project using STS, you only need to select the “start project” option in the IDE, fill in the required details, select the dependencies you want, and it will download and configure the project, making it ready to use.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F58b7ctlaw7tf4r3a83g8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F58b7ctlaw7tf4r3a83g8.png" alt=" " width="699" height="896"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Package Generation&lt;/strong&gt;: Spring Boot generates a JAR package, but it’s a JAR with its own specific structure needed for the standalone setup. It includes the source code, dependencies, and the embedded server, but the command to run this JAR is the same as running any other JAR:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   java &lt;span class="nt"&gt;-jar&lt;/span&gt; target/something-api-1.0.0-SNAPSHOT.jar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are some of the great features of Spring Boot that can make you a more productive developer and make working with Spring Boot easier in your day-to-day tasks.&lt;/p&gt;

&lt;p&gt;Reference: &lt;a href="https://spring.io/projects/spring-boot" rel="noopener noreferrer"&gt;https://spring.io/projects/spring-boot&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Fundamental Questions of Java</title>
      <dc:creator>Thailane</dc:creator>
      <pubDate>Sun, 25 Aug 2024 21:55:20 +0000</pubDate>
      <link>https://dev.to/thailaneld/fundamental-questions-of-java-3peb</link>
      <guid>https://dev.to/thailaneld/fundamental-questions-of-java-3peb</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Java was first released by Sun Microsystems in 1995. The development of Java began in the early 1990s, led by James Gosling and his team. The language was originally called "Oak" but was later renamed "Java" after a type of coffee.&lt;br&gt;
 Java was created to address the need for a platform-independent programming language that could be used to create software that could run on any device, regardless of the underlying hardware or operating system. The primary goal was to allow developers to "write once, run anywhere," meaning that code written in Java could run on any platform that supported the Java Virtual Machine (JVM). &lt;br&gt;
  Java's design focused on simplicity, portability, and security, making it suitable for a wide range of applications, from web development to enterprise software. It quickly gained popularity due to its versatility and the ability to build robust, high-performance applications across different platforms.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Being one of the most widely used languages in software development today, and having studied it for a long time, I've gathered here some questions and answers about the wonderful world of Java.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Hated by many, but loved by others.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxgvz2br0lsxfvtz7tq29.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxgvz2br0lsxfvtz7tq29.jpg" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Questions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. What is the difference between JDK and JRE?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The JDK( Java Development kit ) is used by developers for creating Java applications and includes the necessary tools, libraries, and compilers. The JRE (Java Runtime Environment) is used by end-users to run Java applications and provides the runtime environment and essential class libraries, but does not include development tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. What are the benefits of using Java?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These are benefits of using Java:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Portability:&lt;/strong&gt; Java code can be run on any platform that has a  Java Virtual Machine (JVM).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; Java has a built-in security model that helps to protect users from malicious code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Object-oriented:&lt;/strong&gt; Java is an object-oriented programming language, which makes it easy to create modular and reusable code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Robust:&lt;/strong&gt; Java is a robust language that is designed to be reliable and efficient.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Widely used:&lt;/strong&gt; Java is a Widely used language that has a large community of developers and support resources.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. What are the different components of the Java Platform?&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;The Java Platform is a software environment that provides a standard way for developing and running Java applications. It consists of the following components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Java Virtual Machine (JVM).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Java Runtime Environment (JRE).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Java Development kit (JDK).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. What are the different types of Java data types?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are two types of data types in Java: primitive data types and non-primitive data types.&lt;/p&gt;

&lt;p&gt;Primitive data types&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;boolean&lt;/li&gt;
&lt;li&gt;byte&lt;/li&gt;
&lt;li&gt;short&lt;/li&gt;
&lt;li&gt;int&lt;/li&gt;
&lt;li&gt;long&lt;/li&gt;
&lt;li&gt;float&lt;/li&gt;
&lt;li&gt;decimal places&lt;/li&gt;
&lt;li&gt;double&lt;/li&gt;
&lt;li&gt;char&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Non-primitive data  types&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;String&lt;/li&gt;
&lt;li&gt;Array&lt;/li&gt;
&lt;li&gt;Class&lt;/li&gt;
&lt;li&gt;Interface&lt;/li&gt;
&lt;li&gt;Enum&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. What are the different types of Java control statements?&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;There are three types of control statements in Java:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decision-making statements (if, if else &amp;amp; switch).&lt;/li&gt;
&lt;li&gt;Looping statements (while, do while &amp;amp; for).&lt;/li&gt;
&lt;li&gt;Jump statements (continue &amp;amp; return).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6. What are the different types of Java classes &amp;amp; Java interfaces?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are two main types of Java classes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Normal classes&lt;/strong&gt; are the most common type of class in Java. They can have fields, methods, and constructors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Abstract classes&lt;/strong&gt; are classes that cannot be instantiated. They can only be used as a base class for other classes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are also two main types of Java interfaces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Normal interfaces&lt;/strong&gt; are a collection of abstract methods. A class can implement an interface, thereby inheriting the abstract methods of the interface.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Maker interfaces&lt;/strong&gt; are interfaces that do not contain any methods. They are used to indicate that a class has a certain property or behavior.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Febfs1divmo1xf8q0b5lt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Febfs1divmo1xf8q0b5lt.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. What are the different types of Java libraries &amp;amp; Java frameworks?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Java library is a collection of reusable Java classes and interfaces.&lt;/p&gt;

&lt;p&gt;** Some examples of Java libraries:**&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Apache Commons
Google Guava
Joda-Time
JUnit
Mockito
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;A java framework is a collection of reusable Java classes, interfaces, and code that provides specific functionality.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some examples of Java libraries:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Spring&lt;/li&gt;
&lt;li&gt;  Hibernate&lt;/li&gt;
&lt;li&gt;  JSF&lt;/li&gt;
&lt;li&gt;  Grails&lt;/li&gt;
&lt;li&gt;  Struts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;8. What are the different types of Java tools?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are two types of threads in Java: user threads and daemon threads.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;User threads&lt;/strong&gt; are the threads that are created by the user or application. They are high-priority threads and the JVM will wait for any user thread to finish its task before terminating it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Daemon threads&lt;/strong&gt; are the threads that are created to provide services to user threads. They are low-priority threads and are only needed while user threads are running. Once all user threads have finished their execution, the JVM will terminate even if there are daemon threads still running.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;9. What are the different types of Java networking?&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;There are two main types of Java networking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Client-server networking&lt;/strong&gt; is a type of networking where there is a client application that requests a service from a server application. The server application then provides the service to the client application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Peer-to-peer networking&lt;/strong&gt; is a type of networking where two or more applications communicate directly with each other without the need for a server.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;10. What is the difference between Procedural programming and OOP?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Procedural programming is a top-down approach to programming, where the program is divided into a series of functions that each perform a specific task.&lt;br&gt;
 OOP, on the other hand, is a bottom-up approach to programming, where the program is divided into objects that each represent a real-world entity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11. What are the core concepts of OOP?&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;The core concepts of OOP are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Abstraction:&lt;/strong&gt; Abstraction is the process of hiding the implementation details of an object from the user. This allows the   user. This allows the user to focus on the object's functionality wthout having to worry about how it works.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Encapsulation:&lt;/strong&gt; Encapsulation is the bundling of data and codes into a single unit. This makes it easier to maintain and update the code, and it also makes it more difficult for users to accidentally modify the data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inheritance:&lt;/strong&gt; Inheritance is the ability of an object to inherit the properties and methods of another object. This allows developers to reuse code and create more complex objects with fewer lines of code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Polymorphism:&lt;/strong&gt; Polymorphismis the ability of an object to bahave differently depending on its context. This allows developers to write code that is more flexible and easier to maintain.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;12. What is the difference between Overloading and Overriding?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Overloading refers to the ability to have multiple methods with the same name, but different parameters.&lt;br&gt;
  Overriding refers to the ability to have a method in a subclass that has the same signature as a method in a superclass.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;13. What is the difference between static and dynamic binding?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Static binding and dynamic binding are two different ways of resolving function calls in object-oriented programming (OOP).&lt;/p&gt;

&lt;p&gt;-&lt;strong&gt;Static binding:&lt;/strong&gt; occurs when the compiler determines the method to be called at compile time. This is the most common type of binding in OOP, and it is used for both static and non-virtual methods.&lt;/p&gt;

&lt;p&gt;-&lt;strong&gt;Dynamic binding:&lt;/strong&gt; occurs when the method to be called is not determined until runtime. This is used for virtual methods, which allow for polymorphism.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjwmcpfp084bgezoeto7c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjwmcpfp084bgezoeto7c.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;14. Why Java doesn't support Multiple Inheritance?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java doesn't support multiple inheritance because it can lead to a number of problems, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ambiguity.&lt;/li&gt;
&lt;li&gt;Circular dependencies.&lt;/li&gt;
&lt;li&gt;Complexity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;15. When do you use interface and abstract class in Java?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Abstract classes and interfaces are both used to achieve abstraction in object-oriented programming.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Abstract classes are similar to normal classes, with the difference that they can include abstract methods, which are methods without a body. Abstract classes cannot be instantiated.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Interfaces are a kind of code contract, which must be implemented by a concrete class. Interfaces cannot have state, whereas the abstract class can have state whith instance variables.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;16. What are the challenges of using OOP in Java?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are some challenges associated with using OOP in Java.&lt;br&gt;
  These challenges include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Complexity:&lt;/strong&gt; OOP can make code more complex, especially when dealing with large and complex systems.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Overhead:&lt;/strong&gt; OOP can add some overhead to code, as objects need to be created and managed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing:&lt;/strong&gt; OOP can make code more difficult to test, as objects need to be tested in isolation and in combination.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance:&lt;/strong&gt; OOP can impact performance, as objects can add some overhead.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;17. What is the difference between an array and a linked list?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In general, arrays  are good choice for data structures where the data is accessed frequently and the order of the data is important.&lt;/p&gt;

&lt;p&gt;Linked lists are a good choice for data structures where the data is inserted or deleted frequently and the order of the data is not important. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flumawmx7i89l0ec2hy51.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flumawmx7i89l0ec2hy51.png" alt=" " width="638" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;18. Explain the concept of a hash table.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;A hash table is a data structure that maps keys to values. It is a very efficient data structure for storing and retrieving data, as it can access data in constant time.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;put(key, value):&lt;/strong&gt; This method stores the key-value pair in the hash table.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;get(key):&lt;/strong&gt; This method returns the value associated with the key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;remove(key):&lt;/strong&gt; This method removes the key-value pair from the hash table.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;19. What is the time complexity of various operations in a binary search tree (BST)?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The time complexity of various operations in a binary search tree (BST) depends on the height of the tree. The height of a BST is the number of nodes on the longest path from the root node to a leaf node.&lt;/p&gt;

&lt;p&gt;The following table shows the time complexity of various operations in a BST:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;               Operation---------------Time complexity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv7r8mly4nuwckupyo4ef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv7r8mly4nuwckupyo4ef.png" alt=" " width="380" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;20. Describe the difference between breadth-first search (BFS) and depth-first search (DFS) algorithms.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here is a table that summarizes the key differences between BFS and DFS:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ccaj1lkjqugxodwx6g1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ccaj1lkjqugxodwx6g1.png" alt=" " width="571" height="298"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;21. Explain the concept of a priority queue and provide an example of its application.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;A priority queue is a data structure that stores elements along with their associated priorities. It allows efficient retrieval of the element with the highest (or lowest) priority. The priority determines the order in which elements are processed or accessed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;22. Explain the concept of dynamic programming and provide an example problem where it can be applied.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Dynamic programming is a problem-solving technique that involves breaking down complex problems into smaller, overlapping subproblems and solving them in a bottom-up manner.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;23. How does a HashSet work internally in Java?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A HashSet internally uses a HashMap to store its elements. When you add an element to a HashSet, it is first hashed using the hashCode() method.&lt;br&gt;
  The hash code is then used to find the corresponding bucket in the HashMap. If the bucket is not empty, the element is compared to the other elements in the bucket using the equals() method. If the element is equal to any of the other elements in the bucket, it is not added to the HashSet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;24. What is the time complexity of various operations in a hash table?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The time complexity of various operations in a hash table depends on the hash function used and the number of elements in the hash table. In general, the time complexity of the following operations is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Isertion:&lt;/strong&gt; O(1) on average, O(n) in the worst case.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search:&lt;/strong&gt; O(1) on average, O(n) in the worst case.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deletion:&lt;/strong&gt; O(1) on average, O(n) in the worst case.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;25. What is multithreading, and why is it important in Java?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Multithreading is a programming concept that allows multiple tasks to be executed concurrently. In Java, multithreading is implemented using the thread class. A thread object represents a single thread of execution.&lt;/p&gt;

&lt;p&gt;There are many reasons why multithreading is important in Java.&lt;br&gt;
  Some of the most important reasons include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Increased performance.&lt;/li&gt;
&lt;li&gt;Improved responsiveness.&lt;/li&gt;
&lt;li&gt;Reduced resource usage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;26. How can you create a thread in Java?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are two ways to create a thread in Java:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;By extending the thread class&lt;/li&gt;
&lt;li&gt;By implementing the Runnable interface&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;27. What is the difference between a process and a thread?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A process is a program in execution. It has its own memory space, its own stack, and its own set of resources.&lt;br&gt;
  A thread is a lightweight process that shares the same memory space and resources as other threads in the same process.&lt;/p&gt;

&lt;p&gt;Some of the key differences between processes and threads:&lt;br&gt;
    - Processes are independent of each other.&lt;br&gt;
    - Processes are heavier than threads.&lt;br&gt;
    - Processes are more difficult to create and manage than threads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;28. How does synchronization work in Java? Explain the concepts of synchronized methods and blocks.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Synchronization in Java is a mechanism that allows multiple threads to access shared resources safely. When a thread is synchronized on a resource, it is the only thread that can access that resource.&lt;br&gt;
  This prevents race conditions, which are situations where two or more threads are trying to access the same resource at the same time.&lt;/p&gt;

&lt;p&gt;There are two ways to synchronize in Java:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using synchronized methods.&lt;/li&gt;
&lt;li&gt;Using synchronized blocks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Synchronized methods:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A synchronized method is a method that can only be executed by one thread at a time. To declare a method as synchronized, you need to use the synchronized keyword.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Synchronized blocks&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A synchronized block is a block of code that can only be executed by one thread at a time. To declare a block of code as synchronized, you need to use the synchronized keyword and specify the object that the block is synchronized on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;29. What is a deadlock, and how can it be avoided?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A deadlock is a situation where two or more threads are waiting for each other to finish. This can happen when two threads are each trying to acquire a lock on the same resource.&lt;/p&gt;

&lt;p&gt;To avoid deadlocks, we can do this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avoid using locks unnecessarily. &lt;/li&gt;
&lt;li&gt;Use locks in a consistent order.&lt;/li&gt;
&lt;li&gt;Use deadlock detection and prevention tools.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;30. What is the purpose of the volatile keyword in Java?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The volatile keyword is used to ensure that all threads see the same value of a variable, even if the value is changed by another thread.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;31. Explain the difference between preemptive scheduling and time-slicing in the context of thread scheduling.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Preemptive scheduling is when the operating system can forcibly remove a thread from the CPU and give it to another thread. Time-slicing is when each thread is given a certain amount of time to run on the CPU.&lt;/p&gt;

&lt;p&gt;The main difference is that in preemptive scheduling, the operating system can interrupt a thread at any time, while in time-slicing, the thread is only interrupted when it has used up its allotted time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;32. What is an exception in Java, and why is exception handling important?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Java, an exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions. It is an object which is thrown at runtime.&lt;/p&gt;

&lt;p&gt;Here are some of the benefits of exception handling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prevents program crashes.&lt;/li&gt;
&lt;li&gt;Allows you to recover from errors.&lt;/li&gt;
&lt;li&gt;Provides information about the error.&lt;/li&gt;
&lt;li&gt;Makes your code more robust.&lt;/li&gt;
&lt;li&gt;Makes your code easier to read and understand.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;33. How does Java handle exceptions.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java handles exceptions by using a mechanism called exception propagation. When an exception is thrown, it is propagated up the call stack until it is caught. If the exception is not caught, the program will crash.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;34. Describe the try-catch-finally block and its purpose in exception handling.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The try-catch-finally block is a Java syntax that allows you to handle exceptions gracefully. It consists of three parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The try block.&lt;/li&gt;
&lt;li&gt;The catch block.&lt;/li&gt;
&lt;li&gt;The finally block.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here are some of the benefits of using try-catch-finally blocks: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prevents program crashes.&lt;/li&gt;
&lt;li&gt;Allows you to recover from errors.&lt;/li&gt;
&lt;li&gt;Provides information about the error.&lt;/li&gt;
&lt;li&gt;Makes your code more robust.&lt;/li&gt;
&lt;li&gt;Makes your code easier to read and understand.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;35. What is the difference between the throw and throws keywords in Java?&lt;/strong&gt;&lt;br&gt;
The throw and throws keywords in Java are used to handle exceptions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The throw keyword is used to explicitly throw an exception &lt;/li&gt;
&lt;li&gt;The throws keyword is used to declare that a method can throw an exception.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;36. How can you create custom exceptions in Java?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To create a custom exception in Java, you need to create a class that extends the Exception class. The custom exception class can have its own constructors, methods, and fields.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References:&lt;/strong&gt; &lt;a href="https://medium.com/@spinjosovsky/practical-comparison-between-depth-first-search-dfs-vs-breadth-first-serch-bfs-bf360240cf72" rel="noopener noreferrer"&gt;https://medium.com/@spinjosovsky/practical-comparison-between-depth-first-search-dfs-vs-breadth-first-serch-bfs-bf360240cf72&lt;/a&gt;&lt;br&gt;
 &lt;a href="https://docs.oracle.com/en/java/" rel="noopener noreferrer"&gt;https://docs.oracle.com/en/java/&lt;/a&gt;&lt;br&gt;
 &lt;a href="https://www.algotutor.io/campus-program" rel="noopener noreferrer"&gt;https://www.algotutor.io/campus-program&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>jdk</category>
      <category>jvm</category>
    </item>
    <item>
      <title>MERN Stack Guide</title>
      <dc:creator>Thailane</dc:creator>
      <pubDate>Wed, 21 Aug 2024 19:33:23 +0000</pubDate>
      <link>https://dev.to/thailaneld/mern-stack-guide-3bm9</link>
      <guid>https://dev.to/thailaneld/mern-stack-guide-3bm9</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is MERN Stack?&lt;/strong&gt;&lt;br&gt;
MERN Stack is a JavaScript Stack that is used for easier and faster deployment of full-stack web applications. MERN Stack comprises of 4 tecnnologies namely: MongoDB, Express, React, and Node.js. It is designed to make the development process smoother and easier. &lt;br&gt;
 The MERN architecture allows you to easily construct a 3-tier architecture(frontend, backend, database) entirely using JavaScript and JSON. Using these four technologies you can create absolutely any application that you can think of everything that exists in this world today. Now let's understand each technology one by one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ndy9q53s5w3nf3btjf5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ndy9q53s5w3nf3btjf5.png" alt=" " width="394" height="102"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MongoDB:&lt;/strong&gt;  MongoDB forms the M of the MERN stack and works pretty well with the JavaScript ecosystem. MongoDB is a NoSQL database in a which data is stored in documents that consist of key-value pairs, sharing a lot of resemblance to JSON.&lt;br&gt;&lt;br&gt;
 The data is not stored in the form of tables and that's how it differs from other database programs.  This is how the data stored in MongoDB looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fls1x77xhr6fk5zam0vdq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fls1x77xhr6fk5zam0vdq.png" alt=" " width="436" height="176"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Express:&lt;/strong&gt; Express is a flexible and clean Node.js web application framework that provides a robust set of features to develop web and mobile applications. It facilitates the rapid development of Node based web applications.&lt;br&gt;
 Express helps build the backend  very easily while staying in JavaScript ecosystem. It is preferred for self-projects as it helps focus on learning development and building projects pretty fast.&lt;br&gt;
 In MERN stack, Express will be used as backend API server which interacts with mongoDB database to serve data to client ( React ) application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;React JS:&lt;/strong&gt; React is an open-source JavaScript library that is used for building user interfaces specifically for single-page applications. It's used for handling the view layer for web and mobile apps.&lt;br&gt;
 React lets you build up complex interfaces through simple Components, connect them to data on your backend server, and render them as HTML.&lt;br&gt;
 Almost all the modern tech companies from early-stage startups to the biggest tech companies like Microsoft ad Facebook use React.&lt;br&gt;
 The prime reason why react is used, is for Single Page Applications(SPA). SPA means rendering the entire website on one page rather than different pages of the websites.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Node JS&lt;/strong&gt; NodeJs is a cross-platform JavaScript runtime environment, it's built on Chrome's V8 engine to run JavaScript code outside the browser, for easily building fast and scalable applications.&lt;br&gt;
 The main purpose of NodeJS is simple, it allows us to write our backend in JavaScript, saving us the trouble of learning a new programming language capable of running the backend. &lt;br&gt;
 Node.js is the platform for the application layer ( logic layer). This will not be visible to the clients. This is where client applications (React) will make requests for data or webpages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating a MERN project&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Prerequisites Installation:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Node.js and npm&lt;/li&gt;
&lt;li&gt;MongoDB&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt; Create the Backend with Node.js and Express:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Initialize the Project:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir my-project
cd my-project
npm init -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Install Backend Dependencies:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install express mongoose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Mongoose: Library that simplifies interaction with MongoDB.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Set Up the Server:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Create a file called server.js and add the basic server configuration:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9scrdtk69itncmgqyk5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9scrdtk69itncmgqyk5.png" alt=" " width="522" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create the Frontend with React:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Create the React Application:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app client
cd client
npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;&lt;p&gt;This will create a React application in the client folder.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connect the Frontend to the Backend:&lt;br&gt;
In the frontend, you can use fetch or axios to make requests to the backend created with Node.js/Express.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Connect the Frontend to the Backend:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;In the React application, make HTTP requests to the backend to fetch or send data. For example:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnmlui7h8ba4ya4qe0tg6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnmlui7h8ba4ya4qe0tg6.png" alt=" " width="458" height="177"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run the Complete Project:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Backend: In the root directory of the project (where server.js is located), run:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node server.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Frontend: In the client directory, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you have a basic project up and running with the MERN Stack!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don't forget to configure environment variables to protect sensitive code information&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;References: &lt;a href="https://www.mongodb.com/resources/languages/mern-stack-tutorial" rel="noopener noreferrer"&gt;https://www.mongodb.com/resources/languages/mern-stack-tutorial&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>express</category>
      <category>react</category>
      <category>node</category>
    </item>
  </channel>
</rss>
