Aishwarya Naglot

Aishwarya Naglot

Writing clean code… when the bugs aren’t looking.

About

Developer by passion, debugger by instinct. Forever building, occasionally breaking, constantly evolving.

105 Articles Published

Articles by Aishwarya Naglot

Page 10 of 11

How to construct a JSON object from a subset of another JSON object in Java?

Aishwarya Naglot
Aishwarya Naglot
Updated on 21-Apr-2025 4K+ Views

In this article, we will learn how to construct a JSON object from a subset of another JSON object in Java. If you are not familiar with JSON and its usage in Java, you can refer to our JSON Overview tutorial. JSON Object From a Subset of Another Object There is more than one way to construct a JSON object from a subset of another JSON object in Java. Some of the popular libraries that we can use are - Using org.json library Using Gson library Using ...

Read More

Difference Between LinkedList and LinkedHashSet in Java

Aishwarya Naglot
Aishwarya Naglot
Updated on 21-Apr-2025 2K+ Views

LinkedList and LinkedHashSet are two important classes of Java's Collection framework. They are used to store groups of items, but they work in different ways and have their own unique features. What is a LinkedList in Java? Java LinkedList is a linear data structure that is used to store the same type of elements. It is a part of the Java Collections Framework, and it implements the List as well as the Deque interfaces. It has a dynamic size, which means it can grow and shrink as needed. Example The following is an example of how we write code for ...

Read More

Difference between Java and JavaScript.

Aishwarya Naglot
Aishwarya Naglot
Updated on 14-Nov-2024 1K+ Views

As we know, both Java and JavaScript are programming languages and are used in application development. But there are significant differences between the languages, which we will discuss below. Java Java is a high-level language that is also a platform-independent language. It is mainly used in the development of web applications, mobile applications, games, etc. Java is a statically typed language, which means that the code must be checked for errors before it runs. JavaScript whereas JavaScript is a dynamically typed language, which means that the code is checked for errors while it runs. JavaScript is a client-server-side language, which ...

Read More

Difference between Servlet and JSP

Aishwarya Naglot
Aishwarya Naglot
Updated on 14-Nov-2024 7K+ Views

Both Servlets and JSP are used in web development. The Servlets handle the logic (processing our requests and interacting with databases), and JSPs handle the presentation (displaying dynamic content on the web page). By separating the logic and presentation, our web applications become more manageable and scalable. In brief, we can think of Servlets as Java programs that run on a web server. They work as the middle layer between a request from an HTTP client (like a browser) and databases or applications on the server. When we send a request to a server, the Servlet processes that request, and ...

Read More

Number of pairs with maximum sum in C++

Aishwarya Naglot
Aishwarya Naglot
Updated on 12-Nov-2024 587 Views

We need to find a number of all the pairs that has the maximum sum, In a given array of integers. A pair consists of two numbers, and the sum is simply the result of adding them. We will see multiple solutions to this problem, starting with a naive (brute force) approach and moving to more optimized solutions. Below is the list of approaches we will cover in this article: Brute Force approach using two loops Max Sum Pairs with Sorting ...

Read More

Create a Date object using the Calendar class in Java

Aishwarya Naglot
Aishwarya Naglot
Updated on 11-Nov-2024 2K+ Views

In Java, we can create a date object using the calendar class, which gives us more control on date and time. We will discuss the process in this article. What is the Calendar class? In order to understand the usage of we must know what is the calendar class. The Calendar class allows us to work with date and time more easily than Date class. like, we can set specific parts of the date, like month, year, and day. For using Calendar class, import the following package. import java.util.Calendar; Now, let us create an object of Calendar class. Calendar ...

Read More

Multiply Strings in C++

Aishwarya Naglot
Aishwarya Naglot
Updated on 11-Nov-2024 9K+ Views

We have given two strings consisting of integers and can have lengths up to 200. both strings do not contain any leading 0, but 0 as the number itself can be present. We have to multiply integer strings, so we need to find a solution. Let's see how we can tackle this problem in an easier way. Suppose we have two numbers as strings. We need to multiply them and return the result, also in a string. For example, if the numbers are "26" and "12", then the result will be "312". Following are various ways to ...

Read More

Natural Numbers in C++ Program

Aishwarya Naglot
Aishwarya Naglot
Updated on 11-Nov-2024 4K+ Views

In this article, we will cover C++ programs to work with natural numbers. we use natural numbers in various operations, such as indexing arrays, performing loops, and validating user input. we will also write code to demonstrate how natural numbers can be used for these purposes in C++. Natural Numbers are a set of positive numbers, starting from 1 and going to infinity. natural numbers are: 1, 2, 3, 4, 5... etc In C++, understand concepts like conditions, loops, and how we store and manipulate variables. We will provide everything you need to know about natural numbers along with programs. ...

Read More

Difference between Groovy and Java

Aishwarya Naglot
Aishwarya Naglot
Updated on 11-Nov-2024 1K+ Views

Programmers have been using scripting languages for quite some time. When it comes to Linux and Unix computers, scripting languages were mostly utilised for things like scripting tasks that automate platform customizations, software installations, and one-shot command line jobs with bash scripts. Groovy is an authentically creative language that runs on the same virtual machine as Java. Hence, it can interact with Java in a way that is both efficient and effective. Despite the fact that Java is one of the most popular and commonly used programming languages for producing content for the web, certain activities, such as file handling ...

Read More

Nearest 1 in a binary matrix in C++

Aishwarya Naglot
Aishwarya Naglot
Updated on 05-Nov-2024 268 Views

In this article, we will show you how to find the minimum distance from each cell in a binary matrix to the nearest cell that contains the digit 1. We will see brute force as well as optimized approaches. Problem Statement Given a binary matrix, our task is to calculate the minimum distance for each cell to the nearest cell that contains the value 1, and if the current cell itself has 1 as a value, the distance will be 0. If the input matrix is as follows - 0 0 1 1 1 0 0 0 0 The ...

Read More
Showing 91–100 of 105 articles
« Prev 1 7 8 9 10 11 Next »
Advertisements