Does that mean you are a beginner at Java®? Maybe you have found the wrong book. Please provide more details about the book, including authors, but exam study guides are not intended as beginner's tutorials. There aren't many good beginners' books; I suggest Head First Java by Sierra and Bates (O'Reilly 2005, =HFJ), or maybe Cay Horstmann's beginner's book called something like Java for the Impatient. Beware: HFJ is old, so buy a second‑hand copy and don't pay full price. Horstmann has written at least two books with similar titles.
Ashana Hurkens wrote:. . . I am studying Java programming . . . the Book OCA Java SE 8 programmer I Study Guide . . . .
All IDEs will create their own package and directory structure, so you can only do that exercise via the command line, neither NetBeans nor Eclipse.
. . . I tried to create a file in NetBeans . . . should I do this in another program like Eclipse? . . .
I would recommend you put it elsewhere, viz. the first directory you get when you open a new command line/terminal.You only need line 1 once, and you can give the directory any sensible name. You can use the same instructions on Linux and Windows®. Otherwise, that is good stuff And welcome to the Ranch
Alex Damian wrote:. . . Create a Directory on your Desktop . . .