Add a Value in Ennead Tuple in Java

Alshifa Hasnain
Updated on 14-Jul-2025 18:48:20

146 Views

By default, Java does not have built-in tuple support; to use the tuple, we use the third-party library called Javatuples. Using this library, you can create a tuple of different sizes, starting from a single-element tuple, which is the Unit class, up to a ten-element tuple (Decade class). The following is the list of JavaTuples library classes: Unit: 1 element tuple. Pair: 2 element tuple. Triplet: 3 element tuple Quartet: 4 element tuple Quintet: 5 element tuple ... Read More

Abstraction vs Encapsulation in Java

Alshifa Hasnain
Updated on 14-Jul-2025 18:41:12

1K+ Views

Encapsulation Encapsulation is one of the four fundamental OOPs concepts. The other three are inheritance, polymorphism, and abstraction.Encapsulation in Java is a mechanism for wrapping the data (variables) and the code acting on the data (methods) together as a single unit. In encapsulation, the variables and methods within a class are hidden using the private access specifier (though it's not mandatory for all variables and methods to be private). This is known as data hiding.To access private variables and methods from other classes, one of the simplest ways is by using getter and setter methods. ... Read More

New Methods Added to Process API in Java 9

Alshifa Hasnain
Updated on 14-Jul-2025 18:40:39

193 Views

In this article, we will learn about the new methods added to the Process API in Java 9. First, we will know about what is process API, and the methods in Process API in detail. What is Process API? In Java, the Process API, we can perform any operation regarding a process. If one must get the process ID of currently running process, or to create a new process, or destroy an already running one, or find child and parent processes of currently running process, or just get any information about a process, then the Process API is used to perform ... Read More

Address of a Function in C or C++

Akansha Kumari
Updated on 14-Jul-2025 17:24:15

3K+ Views

In C and C++, every function is stored in the computer's memory, and each function has a memory address just like all other variables. In this article, our task is to see how we can access the address of a function and display it in both C and C++. Accessing Address of a Function To access the address of a function, we simply use its name without parentheses. When we print a function name with parentheses like hello(), we're calling the function. But if we print just hello, it gives us the memory address where the function is stored. ... Read More

1-Bit and 2-Bit Characters in Python

Sarika Singh
Updated on 14-Jul-2025 17:10:22

623 Views

What Are 1-bit and 2-bit Characters? In computers, everything is stored in the form of bits, i.e., the smallest pieces of data that can be either 0 or 1. Now, when we talk about 1-bit or 2-bit characters, we mean how many of these bits are used to make a single character (like a letter or symbol). A 1-bit character is just a single 0. It counts as one character by itself. A 2-bit character is made of two bits and can be either 10 or 11. If we are given a list of bits (containing only 0s ... Read More

Use args and kwargs in Python

Sarika Singh
Updated on 14-Jul-2025 17:08:30

2K+ Views

In Python, functions usually have a fixed number of arguments. However, there are situations where we may want to pass a variable number of arguments. In such cases, Python provides two special constructs: *args and **kwargs. *args allows a function to accept any number of positional arguments. **kwargs allows a function to accept any number of keyword arguments. We will discuss both of these concepts deeply in this article. What is "*args" in Python? In Python, *args allows a function to accept any number of positional arguments. These arguments are collected into a tuple inside the function, allowing ... Read More

1/4 Mile Calculator Using PyQt5 in Python

Sarika Singh
Updated on 14-Jul-2025 17:04:14

203 Views

What Is a 1/4 Mile Calculator? A 1/4 mile calculator helps to estimate how long it will take for a vehicle to cover a quarter-mile (about 400 meters) based on speed. This is a common way to measure a car's acceleration and performance in drag racing. To make this estimation, we will use the following basic formula: ET = (weight / horsepower) ** (1/3) * 5.825 In this formula: ET stands for Estimated Time in seconds Weight is the car’s weight in pounds Horsepower is the engine power in HP Creating a 1/4 Mile Calculator Using PyQt5 ... Read More

Amazing Hacks of Python

sudhir sharma
Updated on 14-Jul-2025 15:42:30

216 Views

Python is one of the programming languages known for its simple syntax, readability. Whether working on development, data analysis, or automation, Python provides the tools to get the task done with less effort. But beyond the basics, Python has some hacks that make the code not only shorter but also more efficient. These are not bugs or workarounds, but the smart ways of using the Python built-in features and functions to solve tasks in a faster manner. In this article, we are going to learn about the amazing hacks of Python. Performing a Swap Without a ... Read More

Analyzing Census Data in Python

Yaswanth Varma
Updated on 14-Jul-2025 15:33:52

741 Views

Census data is the source of information collected by the government to understand the population and its characteristics. It consists of details such as age, gender, education, and housing. This helps the government in understanding the current scenario as well as planning for the future. In this article, we are going to learn how to analyze the census data in Python. Python, with its libraries like pandas, numpy, and matplotlib, is widely used for analyzing census data. Analyzing Census Data Here, we are going to use the sample data that consists of the census data stored in ... Read More

Analyse Mobile Data Speeds from TRAI with Pandas in Python

Yaswanth Varma
Updated on 14-Jul-2025 15:23:33

203 Views

The Telecom Regulatory Authority of India (TRAI) publishes the data regarding mobile internet speeds for various telecom operations across India. It is useful for users and telecom companies to evaluate and compare the performance of different service providers. In this article, we are going to use pandas in Python to analyze the TRAI mobile data speed reports. Let's assume we have downloaded the CSV file named demo.csv with the following structure to use in the examples. demo.csv file ... Read More

Advertisements