Java Articles - Page 59 of 540

Java Program to Categorize Taller, Dwarf and Average by Height of a Person

Shriansh Kumar
Updated on 30-May-2025 16:22:30

569 Views

The given task is to categorize Taller, Dwarf, and Average by the Height of a Person. First of all, we need to define tall, dwarf, and average height of a person. Let us assume -A person with a height between 170cm to 195cm is considered taller.If his height is between 150cm and 195cm, he is considered taller.A person whose height is below 150cm is considered a dwarf.If his height is greater than 195cm, he is considered abnormal.Categorizing the Height of a Person in JavaTo categorize the Height of a Person, we need to compare his height with each range specified above. ... Read More

Java Program to Add Characters to a String

Shriansh Kumar
Updated on 30-May-2025 17:54:49

14K+ Views

Java Program to Add Characters to a String Java provides different ways to add characters to a string. We can add characters in the beginning or at the end or at any position according to the need. In this article, we are going to see three different approaches to do so: Using '+' operator Using methods of StringBuffer and StringBuilder classes ... Read More

How to use Weka Java API in ML

Jay Singh
Updated on 25-Apr-2023 13:47:48

2K+ Views

The Weka Java API is a potent machine-learning tool that makes it easy for programmers to incorporate Weka algorithms into Java applications. Complicated machine-learning models can be easily constructed using the Weka Java API's strong built-in data preparation, classification, regression, clustering, and visualization features. Weka includes a wide range of preprocessing methods, including normalization, discretization, and feature selection, and supports a number of file formats, including CSV, ARFF, and C4.5. Only a handful of the machine-learning methods offered by Weka include neural networks, SVMs, decision trees, and random forests. Developers can quickly train and assess machine learning models, as well ... Read More

Java program to check whether the number is divisible by 5

Tapas Kumar Ghosh
Updated on 14-Feb-2025 18:29:41

4K+ Views

In mathematics, the divisibility rule of 5 states that if the number ends with 0 or 5 then it will divisible by 5. There is another way to identify the divisibility rule of 5, if the remainder comes to 0 it returns the number is divisible by 5. The mod(%) operator is normally used in programming when it comes to divisibility. Following are some examples which helps you to understand the divibility rule of 5 − Given number is 525, the number ends with 5 and it is divisible by 5. Given number is 7050, the number ends with ... Read More

Difference between ArrayList and Vector

Pradeep Kumar
Updated on 19-Apr-2023 17:13:02

2K+ Views

We can store and manage a list of items using the Java Collections Framework classes ArrayList and Vector. Nonetheless, it's crucial to recognise some significant distinctions between the two. We will examine the efficiency, synchronisation, and iterator capabilities of ArrayList and Vector, as well as their similarities and differences, in this tutorial. You will have a comprehensive knowledge of when to utilise ArrayList or Vector in your Java projects by the end of this course. then let's get going! What is an ArrayList? Java's ArrayList class offers an implementation of a dynamic array. It is a resizable array that may ... Read More

Best Java IDEs {With Pros and Cons}

Pradeep Jhuriya
Updated on 19-Apr-2023 13:00:58

583 Views

Introduction Java is one of the most widely used programming languages, and its popularity is not without reason. Java's versatility, scalability, and efficiency have made it a popular choice for developing a wide range of applications, from web to mobile to desktop applications. As a result, there are many Integrated Development Environments (IDEs) available for Java that aim to make the development process easier and more efficient. In this article, we will compare some of the best Java IDEs available, highlighting their pros and cons. Whether you are a beginner or an experienced developer, this article will provide valuable insights ... Read More

Java Math incrementExact(int x) method

Rinish Patidar
Updated on 18-Apr-2023 15:31:52

248 Views

We will explore Java Math incrementExact(int x) method by using the function in Java and understanding its different functionalities. An incrementExact() function is an in-built function in Java in the Math library. This function is used to return a value equal to the parameter passed in the function increased by 1. The function returns an exception due to integer overflow if the value of the integer passed in the function as an argument overflows depends on the data type passed in the function i.e. either int or long.Syntax Syntax of the function − int a; int incrementExact(a); long a; ... Read More

Go vs Java

Sabid Ansari
Updated on 18-Apr-2023 13:03:29

404 Views

Go and Java are two popular programming languages used for developing different types of applications. While both languages have their unique features and advantages, there are some key differences between them that developers should consider when deciding which language to use for their projects. In this article, we'll explore the differences between Go and Java in terms of syntax, performance, concurrency, and more. Go Java Syntax Go has a simpler and more concise syntax compared to Java. Go has fewer keywords and syntax rules, making it easier for developers to read, write and maintain code. ... Read More

Client-Server Diffie-Hellman Algorithm Implementation in Java

sudhir sharma
Updated on 17-Apr-2023 17:07:16

1K+ Views

Introduction Securing sensitive data and communication is more crucial than ever in today's increasingly digital environment. Diffie-Hellman algorithm implementation in Java is one such method for assuring secure communication between a client and server. This advanced key exchange technique allows for encrypted data transfer while mitigating risks posed by eavesdropping or unauthorized access. Keep reading to learn how you can harness this powerful cryptographic tool to protect your valuable information! Understanding the Diffie-Hellman Algorithm The Diffie-Hellman algorithm is an important key exchange method used in cryptography that enables two parties to securely communicate and establish a shared secret over a ... Read More

Java program to show inherited constructor calls parent constructor by default

Rudradev Das
Updated on 18-Nov-2024 22:30:58

443 Views

In this article, we will learn about constructors in Java. Constructors initialize objects when they are created. We will also see how the parent constructor is called in inheritance. Problem StatementWe will demonstrate possible approaches to show how the inherited constructor calls the parent constructor by default.Different approaches The following are the different approaches to show how the inherited constructor calls the parent constructor by default− Demonstrating inheritance properties ... Read More

Advertisements