Articles on Trending Technologies

Technical articles with clear explanations and examples

Difference Between EnumSet and TreeSet in Java

Way2Class
Way2Class
Updated on 28-Jul-2023 297 Views

In Java, collections provide a wide range of options for storing and manipulating data. Two popular collection classes, EnumSet and TreeSet, offer distinct approaches for managing sets of elements. While they both serve the purpose of storing unique elements, they have fundamental differences in their implementation and usage. This article aims to delve into these dissimilarities, providing a clear understanding of EnumSet and TreeSet in Java. Syntax Before we investigate their contrasts, let's look at the fundamental language structure for making EnumSet and TreeSet occurrences − EnumSet EnumSet enumSet = EnumSet.noneOf(EnumType.class); TreeSet TreeSet treeSet = new TreeSet(); ...

Read More

Print matrix elements using DFS traversal

Someswar Pal
Someswar Pal
Updated on 28-Jul-2023 1K+ Views

Introduction Depth-First Search (DFS) is a graph traversal method that looks at vertices and edges by starting at a certain node and going as far as possible down each branch before going back.It looks at the "depth" of the graph, starting with the node that is the deepest and then going back to look at other lines. Recursion or a stack can be used to make DFS work. It can be used to find paths, find cycles in graphs and vectors, and do exhaustive searches. Understanding the Matrix Structure In data analysis, a matrix is a two-dimensional array. Matrix data ...

Read More

Difference between Early and Late Binding in Java

Way2Class
Way2Class
Updated on 28-Jul-2023 3K+ Views

In object-oriented programming, official refers to the method of interfacing a strategy call to its execution. Java, an object-oriented programming dialect, supports early official and late authoritative which are too known as inactive authoritative and energetic authoritative, separately. Both forms of binding have advantages and applications. We will look at the syntax, explanation, and distinctions between early and late binding in Java in this post. Syntax The syntax for early binding in Java is as follows. = new (); The syntax for late binding in Java is as follows. = new (); Explanation of ...

Read More

Maven Project with Junit – Checking for a Bank Account Number

Way2Class
Way2Class
Updated on 28-Jul-2023 273 Views

All the applications whether small or large are required to undergo a set of processes building, generating, compiling and running of the source code. These set of processes are manually performed by the programmers. However, with the launch of the Apache’s Maven Project, all these sets of processes can be automated and the manual work can be avoided. Therefore, the maven project is an open source tool that is used to build and deploy several projects at once for providing better project management. In this article, we will be discussing the Maven Project for checking a bank account number whether ...

Read More

What is MetaSpace in Java?

Way2Class
Way2Class
Updated on 28-Jul-2023 3K+ Views

"MetaSpace" is not a phrase that is generally used or recognised as part of the Java Programming language’s standard library or syntax. As a result, "MetaSpace" is likely to relate to anything specific to a particular Java programme or project, rather than a general Java idea. It is impossible to offer a detailed description or explanation of "MetaSpace" in Java without further context or infformation about the individual application or project. However, it’s possible that "MetaSpace" refers to thhe physical world rather than the digital or virtual world. It may be used in this context to distinguish between online or ...

Read More

Mapping CSV to JavaBeans using OpenCSV

Way2Class
Way2Class
Updated on 28-Jul-2023 2K+ Views

CSV files are basically plain text files that stores data in columns separated a comma. OpenCSV is the library that parses these CSV files which are quite difficult to handle otherwise. It is a quite easy to use library that supports several features like reading and writing of CSV files with headers. We will be discussing the mapping of CSV files to JavaBeans via OpenCSV in this article. Additionally. OpenCSV is a tool that aids in this process. Mapping the CSV to JavaBeans The OpenCSV library provides certain classes and mapping strategies to map the CSV files into Java Beans. ...

Read More

LongFunction interface in Java

Way2Class
Way2Class
Updated on 28-Jul-2023 266 Views

A LongFunction in Java is a functional interface which takes one argument of type long and returns a result of some other type. Functional interface is an interface that have only one abstract method. To use this interface first you have to import java.util.function package.  The functional method of this interface is ‘apply()’ which takes long value as an argument and returns function result denoted by R. Syntax R apply(long value); Algorithm In order to effectively implement this functional interface into your work, there are three defining steps one must abide by beforehand. First off, establishing an ...

Read More

Create a Simple Login Web Application with Encrypted Password in Java

Way2Class
Way2Class
Updated on 28-Jul-2023 1K+ Views

Building a web application with encrypted password can be a challenging task in Java. Let’s simplify this process and look into how to create a simple login web application with encrypted password using JSP and Servlets. Powered by advanced technological developments, our state-of-the-art login system grants access privileges exclusively to registered users via unique log-in credentials that are carefully verified before granting restricted entry into secure areas on our website infrastructure. Integrating with JDBC (Java DataBase Connectivity), we're ensuring industry-standard secure storage of sensitive customer details within our project's backend that strictly complies with recognised server security best-practices that stress ...

Read More

Loading Resources from classpath in Java with Example

Way2Class
Way2Class
Updated on 28-Jul-2023 3K+ Views

Resources play an important role during runtime by providing necessary files that enable smooth software operation. These resources are accessible through a classpath system which allows them to be read from or written into with ease. For managing this process effectively within Java programs, several APIs such as the ClassLoader and Class classes exist - these offer various features for identifying resource locations within the app's environment and retrieving related information while at it. Algorithm Step 1 − Get the class loader for the current class Step 2 − Load a resource as a URL/Inputstream.For those who choose to ...

Read More

Loading Button in Android

Way2Class
Way2Class
Updated on 28-Jul-2023 1K+ Views

A typical UI component in Android applications that tells the user that an operation is being processed is the loading button. The button text transforms into a loading animation or progress bar when a user presses it, indicating that the programme is processing the user's request. This is especially helpful when an operation, like completing a form or downloading data, can take a few seconds to complete. By removing confusion and offering updates on the status of an action, a loading button can improve the user experience. It is a straightforward but efficient method for raising an Android app's perceived ...

Read More
Showing 35171–35180 of 61,297 articles
Advertisements