Ashin Vincent has Published 26 Articles

Print the season name of the year based on the month number in java

Ashin Vincent

Ashin Vincent

Updated on 28-Feb-2025 14:14:55

234 Views

In this article, we will explore different methods to find the season name from the month number in Java. When the user inputs the month number, the output should be the season by the name associated with the month. If the user enters 1 as the month number, the month ... Read More

Giuga Number in Java

Ashin Vincent

Ashin Vincent

Updated on 28-Feb-2025 11:36:34

118 Views

In this article, we will learn about Giuga Numbers and how to write a code to check if a number is a Giuga Number or not in Java. A Giuga number is a composite number N such that for each prime factor p of N, (N/p)-1 is divisible by p. ... Read More

Duodecimal in java

Ashin Vincent

Ashin Vincent

Updated on 28-Feb-2025 11:27:37

139 Views

The duodecimal number system is also known as the base-12 number system. The decimal system (base-12) uses digits 0-9, while the duodecimal system uses digits 0-9 along with two additional symbols, A and B. In duodecimal, 10 represents 12 , which means 12 in the decimal number system is 10 ... Read More

Difference Between JDK and BlueJ

Ashin Vincent

Ashin Vincent

Updated on 28-Feb-2025 11:09:15

182 Views

JDK (Java Development Kit) is a software development kit that contains all the necessary tools and components that are essential to develop a Java application. Whereas BlueJ is an IDE that will make the process of developing a Java application a lot easier. BlueJ requires JDK installed on the system ... Read More

Checking if Two Words Are Present in a String in Java

Ashin Vincent

Ashin Vincent

Updated on 28-Feb-2025 10:20:49

228 Views

In this article, we will learn how to check if two given words are present in a string. This is useful when you need to check for multiple words in the text for different purposes, like searching, filtering, or text analysis. We will explore different approaches on how to implement ... Read More

Java Program to Find Two Elements Whose Sum is Closest to Zero

Ashin Vincent

Ashin Vincent

Updated on 27-Feb-2025 13:28:34

151 Views

In this article we will learn how to find the two elements in an array whose sum is closest to zero. The array can contain both positive and negative values as well. Let's understand with the help of an example. Example Let's take an array with the following elements ... Read More

Find Square Root of a Number Without the sqrt Method in Java

Ashin Vincent

Ashin Vincent

Updated on 27-Feb-2025 13:15:02

198 Views

In Java, we can easily find the square root of a number using the inbuilt function 'Math.sqrt()’. But sometimes during an interview, the interviewer may ask to write the code from scratch without using inbuilt functions. So in this article, we will discuss the different ways to find the square ... Read More

Length of the longest consecutive zeroes in the binary representation of a number in java

Ashin Vincent

Ashin Vincent

Updated on 27-Feb-2025 12:55:23

153 Views

You are given a number (N); you need to find the length of the longest consecutive zeroes in the binary representation of the number using different approaches. Example Input N = 529 The binary form of 529 is 1000010001. Output The longest chain of zeroes in the binary form ... Read More

Lead Number in java

Ashin Vincent

Ashin Vincent

Updated on 27-Feb-2025 12:43:07

510 Views

A lead number is a number whose sum of even digits is equal to the sum of odd digits. In this article, we will learn about lead numbers and programs to check if a number is a lead number or not. Lead number example Let’s take the number 615341. The ... Read More

Java Program to Implement Associative Array

Ashin Vincent

Ashin Vincent

Updated on 27-Feb-2025 12:28:06

153 Views

What is an associative array? An associative array stores data in key-value pairs where we can retrieve values using unique keys. There is a significant difference between standard arrays and associative arrays. Normal arrays use numbers for indexing (like arr[0], arr[1], arr[2]). Whereas in an associative array, we use meaningful ... Read More

Advertisements