Blog Archives

06: Java 8 way of File reading and functionally processing the data

Output:

#1 double colon notation ::

The new double colon (::) operator that Java 8 has to convert a normal method into lambda expression.

Read more ›



15 Java old I/O and NIO (i.e. New I/O) interview Q&As

Q1. What is the purpose of Java I/O System? A1. The purpose is to provide an abstraction for all types of I/O like memory, file, … Read more ›...



6 Key considerations in processing large files in Java

Q1. What are the key considerations in processing large files?
A1. Before jumping into coding, get the requirements.

#1 Trade-offs among CPU, Memory Usage &

Read more ›



Processing large files efficiently – BigData & Hadoop – part 3

Q1. What are the different data sizes, and what technologies can be used to process them? A1. In general, data sizes can be classified as shown below. … Read more...



Processing large files efficiently in Java – multi-threaded code – part 2

If you want to process medium sized data (e.g. 2 GB to 100 GB in multiple files) in Java, consider writing a batch job with Spring batch or Java EE...



Read a text file from Java classpath

File to read: src/main/resources/examples/request.xml

read-file-from-classpath

1. Using Java API without any libraries

You can also use the “ClassLoader”

Read more ›



Reading a text file in Java with the Scanner

As a Java developer it is a very common task to read file contents to a String object. It is also very common in pre-interview written tests read the contents of a file and apply regex to split string,

Read more ›



Reloading configuration files in Java without stopping the server

Q1. Why & when do you want to use properties files for the project configuration as opposed to Java constants?
A1. It is a best practice to externalize application related properties that are likely to change.

Read more ›



800+ Java Interview Q&As

Top