
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 7442 Articles for Java

514 Views
By using the 'getBytes()' function, one may convert a string into a byte array in the world of Java programming. The end result of this procedure is the acquisition of the starting string's representation as a byte array, with the method's specifications dictating the encoding. By using the 'getBytes()' function, there are two different ways to convert a string to a byte array in Java. The first strategy involves using the JVM's default charset encoding, which is an encoding technique. The second method depends on a specific charset encoding being supplied, with the requirements of the application in question determining ... Read More

202 Views
Java programming involves the conversion of String to byte array, a handy technique for a multitude of purposes including network communication or data encryption. To achieve this, the String class provides an array of methods for such conversion, with the getBytes() method being one of them. It is crucial to note that choosing the appropriate encoding is crucial since each encoding utilizes different regulations when it comes to character to byte value mapping. In this article, we will delve into two techniques for converting a String to a byte array using Java's getBytes() method. Additionally, we will provide an ... Read More

1K+ Views
Traversing a directory, a common task in various programming applications, involves navigating through the files and subdirectories in a folder. In Java, there exist different strategies for directory traversal, with recursion and iteration employing a stack being two common approaches. Recursion necessitates a function repeatedly calling itself to solve a problem, whereas iteration utilizing a stack requires a data structure to track the program's state. Both methods possess their own advantages and disadvantages, and the optimal approach hinges on the particular needs of the program. This article delves into both methods, presenting sample code to exemplify their use in Java. ... Read More

512 Views
Recursion, a potent programming technique, entails the resolution of a problem by decomposing it into smaller, more manageable sub problems and applying the same algorithm to solve them. In the realm of Java programming, recursion proves to be an invaluable tool when it comes to printing the binary representation of an integer. The binary equivalent, expressed in a base-2 numeral system that employs only two digits, 0 and 1, poses a common challenge in the field. In this article, we shall embark to unravel the intricacies of printing the binary equivalent of an integer using recursion in Java. Our ... Read More

696 Views
The XSLT (eXtensible Stylesheet Language Transformations) Processor is a piece of software that processes XML documents and applies transformation rules to create new XML documents or other output formats like HTML, plain text, or PDF. With the use of templates, element selection and manipulation, and operations like sorting and filtering, developers can build rules for converting XML documents into various formats using the powerful language known as XSLT. An XSL processor that can be used to implement XSLT transformations is built into the popular programming language Java for processing XML documents. Developers can read, parse, and process XML documents, apply ... Read More

3K+ Views
PDFMergerUtility class is used for merging multiple PDF documents into a single PDF document. PDFMergerUtility class will take a number of PDF files and merge them, and save the result as a new document. To merge PDFs using java will require the installation of apache library. There may be different approches to merge PDF files using java. Definition: Merging PDFs using java Example Input − PDF1 = Alice.pdf, PDF2 = Bob.pdf Output − newMerged.pdf // merged pdf of pdf1 and pdf2 Program code// Merging two pdf documents here import org.apache.pdfbox.multipdf.PDFMergerUtility; import org.apache.pdfbox.pdmodel.PDDocument; import java.io.File; ... Read More

1K+ Views
Cryptography is the study and practice of different techniques to secure communication from third party. It is used for cyber security. We try to develop approaches and practices for protecting sensitive data. The sole objective of cryptography is to secure data from the attacker. Asymmetric Encryption is also referred as public/private key. Private key as goes as its name, it will be private while the public key can be distributed. Encryption is a mathematical correlation between two keys, one for encryption and the other for decryption. For example, if there are two keys “A1” and “A2”, then if key “A1” ... Read More

2K+ Views
Anagram Strings are those strings that have the same characters in each of the strings only the order in which they are arranged changes. In other words, a string is an anagram string if it forms a meaningful word after rearranging the characters of the other string. Some examples of anagram strings are “cat and act”, “care and race”. Both of them have the same characters and their frequencies. In this article, we will be discussing the approach to check whether the two strings are anagrams of each other or not using the HashMaps in Java. Problem Statement ... Read More

592 Views
Julia and Java Julia is a dynamic programming language whereas Java is an object-oriented programming language. Julia contains user-friendly syntax and Java is a purpose programming language. Both Julia and Java are programming languages used to create different types of applications. Both offer different types of features to make coding easy. Julia enables work for parallel and distributed computing. Java does not run to improper method addresses. Java allows the collection of garbage. Julia defeats Java in syntax, speed and applications. Therefore, we will cover the main difference between these two extensively used programming languages in this article. What ... Read More

517 Views
JRE stands for Java Runtime Environment. It is mainly a part of the Java Development Kit (JDK). It is free of cost so we can easily find it on any software to use in our program. It consists of a Java class library, specific tools and many more important tools. JRE can be implemented on any operating system and it works as an outer layer of the operating system. It also consists of Integration Libraries and base libraries such as Java Database Connectivity (JDBC), Java Naming and Directory Interface (JNDI), Java Management Extension (JMX), Java Native Interface (JNI), Java for ... Read More