Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles by Mr. Satyabrata
318 articles
Java Program for Arithmetic Operations Between BigDecimal and Primitive Data Types
In this article, we will explore how to perform arithmetic operations between BigDecimal and Primitive data types by using Java. For instance, Addition: The sum of a BigDecimal object with a value of 10.50 and an int primitive with a value of 5 is a BigDecimal object with a value of 15.50. 10.50 + 5 = 15.50 SyntaxThe syntax doubleValue() method returns the value of a BigDecimal object as a double primitive type. double doubleNum1 = num1.doubleValue(); Where “num1” is a BigDecimal object. What is BigDecimal in Java? BigDecimal is a class in Java's java.math package that ...
Read MoreWhy Does Java Use both Compiler and Interpreter?
Let's begin this article with a basic question. What do you mean by Language Translator? You may imagine a tool or piece of software that can translate between languages as needed so that both parties can understand. You are totally correct. Compilers and interpreters are simply language translators in computer programming. These are the software programs/tools that translate the source code of a programming language into machine code, bytecode, or any other intermediate code. Or, to put it simply, it transforms code from High Level Language to Low Level Language, making it machine understandable code. Every programmer is aware that interpreter ...
Read MoreFind All the Subarrays of a Given Array in Java
An array is a linear data structure in which elements are stored in contiguous memory locations. As per problem statement, we have to find all the subarrays of a given array. Subarrays are part or a section of an array. When we talk about all subarrays of an array, we talk about the total number of combinations that can be made using all the elements of the array without repeating. Let’s explore the article to see how it can be done by using Java programming language. To Show you Some Instances Instance-1 Suppose we have the below array [10, ...
Read MoreJava program to check if a point is on the left or right side of a line
A line consists of an infinite number of points. In two-dimensional coordinate system we can define every point with two values i.e. X and Y. A point basically situated on the left side or right side or it can be on the line itself and this can be defined only if we have the coordinates of it. In this program we are going to use the cross-product method to find the direction of the point. Cross- Product method is used to find the third vector from two vectors by cross multiplying both the vectors. In our case if we cross ...
Read MoreHow Edge Computing and 5G will Help IoT?
Edge computing & 5G are two of the most essential technologies & the mixture of these two technologies has a high potential to transform the way IoT devices work, causing them more efficient, faster, & more reliable. In this article, we will examine how edge computing and 5G will help IoT. What is Edge Computing? A distributed computing paradigm known as edge computing enables data processing and storage to be carried out near the data sources, such as IoT devices, sensors, and mobile devices. This strategy aims to minimize latency, decrease bandwidth usage, & enhance overall performance & ...
Read MoreJava menu driven program to check positive negative or odd even number
A number is said to be a positive number if it is greater than 0 and if it is less than 0 then it is called a negative number. The negative number is followed by a minus sign (-) to identify it as a negative number. A number is said to be an even number if it is divisible by 2 else it is called an odd number. In this article, we will see how to check if a number is positive, negative, or even, odd by using Java programming language. We will be implementing the application using a switch ...
Read MoreHow to Read a File into an ArrayList in Java?
In Java, an ArrayList is a resizable array, which is implemented as part of the Java Collections Framework. It is a dynamic data structure that can hold any type of objects, including primitive types such as integers and characters. As per the problem statement we have to read a file into an ArrayList. First and foremost we will take the path of the file as input and then we will apply different method to read the file. Let's start!Example For instance Suppose the input file is “myfile.txt”. After reading the content of the file, the result ...
Read MoreHow to Check if an Array is Empty or Not in Java
In Java, Array is an object. It is a non-primitive data type which stores values of similar data type. As per the problem statement we have to check if an array is empty or not. An array is said to be an empty array, if the array has zero element or no element in it. Let’s explore the article to see how it can be done by using Java programming language. InstancesTo show you some instances: Instance-1 Suppose the original array is {1, 3}. After checking if it is empty or not the result will be − Array is ...
Read MoreKotlin vs Java, Which One is the Best?
There is no comparison between Kotlin and Java because one is best than another, so we could not decide which is best. Because Kotlin is a vibrant, advanced software programming language. It is simple to learn, particularly if you are already familiar with Java (it is completely compatible with Java). Kotlin is used to create Android applications, web server applications, and many other things. Java is a well-known software program. It is used to create smartphone applications, web applications, desktop applications, games, and many other things. It depends, as with everything, so we'll take a glance at the main differences ...
Read MoreWhy Java is a Secure Programming Language?
As technology continues to grow and evolve, so does the number of cyber threats. Cybersecurity is now a top priority for many people, businesses, and governments. A secure programming language is a key component of any effective cyber security strategy. Secure Programming is the Key to Data Protection: Why You Need It? A secure programming language is designed to be resistant to attack. It is for preventing malicious code from being executed. It is also to protect data from being stolen. It also provides safeguards to ensure that the code is not easily altered or corrupted. One of the biggest ...
Read More