Article
In Java, working with files and directories is rather common. We are also often interested in the contents of those files and directories. Depending on the contents of the file, we might want to behave differently. We might be writing some data into a file and we first want to...
Luka Čupić
This tutorial will go through some common techniques for removing elements from Java arrays. Manipulating array elements is an extremely common task as discussions about it can be found on many forums, particularly on StackOverflow. Here's a list of the techniques and methods we'll go over in this article: Using...
Python's built-in sequence representation is a list, defined as a heterogeneous sequence of elements, where each element has a definitive index in the sequence. Note: Heterogeneous sequence means that one list can contain elements of different types. To use arrays, you'd have to import the array module, which does ship...
Text translation is a difficult computer problem that gets better and easier to solve every year. Big companies like Google are actively working on improving their text translation services which enables the rest of us to use them freely. Apart from their great personal use, these services can be used...
In this tutorial, we'll be reading a file into a String in Java. There are a few ways we can read the textual contents of a file. Here's a list of all the classes and methods we'll go over: Files.lines() Files.readString() Files.readAllBytes() FileReader BufferedReader Scanner Files.lines(...
Saving a String into files can be done in a few ways using Java. In this article, we'll show some common methods for writing a String into a file. Here's a list of all the classes and methods we'll go over: Files.writeString() Files.write() FileWriter BufferedWriter PrintWriter Files.writeString(...
Lists are some of the most commonly used data structures. In Java, a common question when using a List implementation is: Which implementation do I use? Should you choose an ArrayList or a LinkedList? What's the difference between these two? In this article, we'll go through both of these implementations,...
In this article, we'll discuss a concept related to serialization and deserialization in Java. Although sometimes considered as "part of the black magic of the Java serialization API", in this article we'll see that serialVersionUID is in fact quite straightforward and simple. First, we'll gloss over serialization and...
There are multiple ways of formatting Strings in Java. Some of them are old-school and borrowed directly from old classics (such as printf from C) while others are more in the spirit of object-oriented programming, such as the MessageFormat class. In this article, we'll gloss over several of these approaches....
© 2013-2024 Stack Abuse. All rights reserved.