Generating test datasets

Generating numerical test data is easy with Java. It boils down to using a java.util.Random object to generate random numbers.

Generating test datasets

Listing 2-13 Generating random numeric data

This program generates the following CSV file of eight rows and five columns of random decimal values.

Generating test datasets

Figure 2-9 Test data file

Metadata

Metadata is data about data. For example, the preceding generated file could be described as eight lines of comma-separated decimal numbers, five per line. That's metadata. It's the kind of information you would need, for example, ...

Get Java Data Analysis now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.