Questions 1) what do they mean with the 'specified id' in this context? It seems like we have to create a method in which you can pass the int id? 2) what is this args[0] in this context? I only know it from the main method that you enter an argument(s) in the main method when you modify the main() 3) what is display.ed? Every product? As each productString starts with an int id so we're not looking for a specified int id? I actually do not understand this sentence: The program should search the file and display information related to the specified id passed as the first argument. => I know now after having seen the solution sort of what they mean.
package com.codegym.task.task18.task1822;
import java.io.*;

public class Solution {
       public static void main(String[] args) throws IOException {
        //step1: read a filename from the console
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String file = reader.readLine();
        reader.close();

        //step2: Create an inputStream for the file.
        //I wrap the inputStream in a bufferedReader as I want to use readLine() method
        BufferedReader reader2 = new BufferedReader(new FileReader(file));
        while (!reader2.readLine().isEmpty()) {
            String product = reader2.readLine();//here I read each product per line
            //and check if  the product has an id
            //TODO: The program should search the file and display information related to the specified id passed as the first argument.
            //what do they mean with the 'specified id' in this context?
            //what is this args[0] in this context? I only know it from the main method that you enter an argument(s) in the main method
            if (product.startsWith(args[0] + " ")) {
                //what does this display. Every product? As each productString starts with an int id
                System.out.println(product);
                break;
            }
      }
}