Lern how to make System.out.println() print data to a file by replacing the default System.out
Also find me here:
Baeldung Editor
Michal Aibin
Michal Aibin is a Faculty at British Columbia Institute of Technology and Visiting Associate Professor at Northeastern University with over 10 years experience in software development industry. He received his doctorate degree in Informatics in 2017 and since then published more than 50 research papers. His main research interests are optimization and modeling of optical networks, adaptive algorithms and machine learning. Personally, he enjoys horseback riding and playing music.
Here's what I've reviewed (so far):
Baeldung on Java
- All
- Java (12)
- Java Collections (3)
- DevOps (3)
- Persistence (2)
- Testing (1)
- Spring Data (1)
- Spring Boot (1)
- Java Concurrency (1)
- Gradle (1)
- Data (1)
- Algorithms (1)
How to Take Input as String With Spaces in Java Using Scanner?
Filed under Java
Learn how to read values containing spaces from a Scanner through examples.
Classpath vs. Modulepath in Java
Filed under Java
Explore the distinction between the modulepath and classpath in Java.
Creating Custom Iterator in Java
Filed under Java Collections
Learn how to create a custom iterator in Java and apply it to our collections.
Get Last N Messages in Apache Kafka Topic
Filed under Data
Learn how to get the latest N messages of a Kafka Topic.
How to List All Pods and Its Nodes in Kubernetes
Filed under DevOps
Explore commands to retrieve information about all pods and their assigned nodes.
Java PrintStream to String
Filed under Java
This article provides several ways of converting a PrintStream to a String in Java.The approaches include using ByteArrayOutputStream, a custom output stream, and Apache Commons IO.
Opening a New Tab Using Selenium WebDriver in Java
Filed under Testing
Explore two approaches to opening a new tab with Selenium.
Regular Expression: \z vs \Z Anchors in Java
Filed under Java
Explore the differences between \z and \Z anchors, how they work, and when to use them.
Difference Between implementation and compile in Gradle
Filed under Gradle
Learn the difference between “implementation” and “compile” in Gradle and provide best practices for effective dependency management
ArrayBlockingQueue vs. LinkedBlockingQueue
Filed under Java Collections, Java Concurrency
Learn about the implementation differences between ArrayBlockingQueue and LinkedBlockingQueue.
Convert an OutputStream to an InputStream
Filed under Java
Explore two approaches to converting an OutputStream to an InputStream: using a byte array and a pipe.
Storing Java Scanner Input in an Array
Filed under Java
Learn how to store the input from a Scanner into an array with three different scenarios and examples.
Java: Read Multiple Inputs on Same Line
Filed under Java
Learn how to read multiple inputs on the same line using the Scanner class.
Intercept SQL Logging with P6Spy
Filed under Persistence
Explore multiple advantages of relying on an external third-party library such as P6Spy to log database queries.
Overriding hashCode() And equals() For Records
Filed under Java
Learn how records provide us with a default implementation of equals() and hashCode() methods.
Difference Between FileReader and BufferedReader in Java
Filed under Java
Learn how to use FileReader and BufferedReader and the differences between them.
Comparing Two Byte Arrays in Java
Filed under Java Collections
Learn common pitfalls when comparing the contents of two arrays and explore the correct way to compare two byte arrays.
Spring Boot H2 JdbcSQLSyntaxErrorException expected “identifier”
Filed under Persistence, Spring Boot
This tutorial explains the exception org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement expected “identifier”. It provides a practical example to reproduce the exception and showcases how to fix it by double-quoting the keyword or using a JDBC URL workaround. It also covers how to automatically quote all database identifiers when using Hibernate.
ClusterIP, NodePort, and LoadBalancer: Kubernetes Service Types
Filed under DevOps
Learn about the three primary service types in Kubernetes, their benefits, limitations, and best practices for their usage.
Remove Punctuation From a String in Java
Filed under Java
Learn how to remove punctuation from a string using the standard String.replaceAll() method.
Print “” Quotes Around a String in Java
Filed under Java
Explore three different approaches to printing a string with quotes (“) around it.
How to Decode a Kubernetes Secret?
Filed under DevOps
Explore the fundamentals of Kubernetes secrets, including their functionality, encoding process, and how to decode them for content access.
How to Persist a List of String in JPA?
Filed under Spring Data
Explore what kind of possibilities there are in JPA to store a list of strings of an entity.
Getting Pixel Array From Image in Java
Filed under Algorithms
Learn how to get a two-dimensional array that contains the combined RGB values for every pixel in an image in Java.
Baeldung on Linux
- All
- Administration (1)
How to Access Microsoft Windows Administrative Share From Linux
Filed under Administration
Explore browsing Microsoft Windows administrative shares from Linux.
Baeldung on Computer Science
- All
- Machine Learning (1)
Sensitivity and Specificity
Filed under Machine Learning
Learn about sensitivity and specificity in ML.